Skip to main content
Question

Create new node onclick


function temp() {
    return (
       <Frame
        width={500}
        height={500}
       >
        <Text  onClick={()=>{
            const node = figma.createRectangle()
            // how can I append this node to the frame?
        }}>Click me to add new rectangle</Text>
       </Frame>
    )
}

I am trying to create a node using createNodeFromJSXAsync by using the above method

This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings