Search
getNodesWithType
Get descendants of this node that match the given type.
// Get all frame nodes in a project. const frameNodes = await framer.getNodesWithType("FrameNode") // Query within a selection subtree. const selection = await framer.getSelection() if (selection.length === 1) { const frameNodes = await selection[0].getNodesWithType("FrameNode") }
This can also be used to query within a selection subtree.
Parameters
type:"FrameNode"– The node type to search for.
Returns
Promise<FrameNode[]>– An array of matching descendant nodes.