createComponent
info
This API is only available in Figma Design
Creates a new, empty component.
Signature
createComponent(): ComponentNode
Remarks
By default, the new node has width and height both at 100, and is parented under figma.currentPage
.
This function creates a brand new component. To create a component from an existing node, use figma.createComponentFromNode
.
Create a component
const component = figma.createComponent()