Skip to content

Instantly share code, notes, and snippets.

@gavinmcfarland
Last active March 19, 2021 10:10
Show Gist options
  • Save gavinmcfarland/1fa5713e81e2153d80eb177c080303f6 to your computer and use it in GitHub Desktop.
Save gavinmcfarland/1fa5713e81e2153d80eb177c080303f6 to your computer and use it in GitHub Desktop.
Get list of page names in Figma
function getPageNames() {
var names: any = []
var pages = figma.root.findAll((node) => {
if (node.type === "PAGE") {
names.push(node.name)
}
return (node.type === "PAGE")
})
return names
}
print(getPageNames().join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment