findChildren
Searches the immediate children of this node (i.e. not including the children's children). Returns all nodes for which callback
returns true.
Supported On:
Signature
findChildren(callback?: (node: SceneNode) => boolean): SceneNode[]
Parameters
callback
A function that evaluates whether to return the provided node
. If this argument is omitted, findChildren
returns node.children
.
Remarks
Example: find all frames that are immediate child of the current page.
const colors = figma.currentPage.findChildren(n => n.type === "FRAME")