Skip to main content

findChildren

Searches the immediate children of this node (i.e. not including the children's children). Returns all nodes for which callback returns true.

If the manifest contains "documentAccess": "dynamic-page", and the node is a PageNode, you must first call loadAsync to access this function.

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 childFrames = figma.currentPage.findChildren(n => n.type === "FRAME")