Rectangle

Wrapper for the Figma Rectangle.

Props

PropTypeDefaultNote
nameStringThe name to be displayed in the Figma Layers List
topNumber
leftNumber
widthNumber
heightNumber
styleStyleNot all props
onSelectionEnterFunctionSelection enter event callback
onSelectionLeaveFunctionSelection leave event callback
onLayoutFunctionEvent is fired once the layout has been calculated
onNodeIdFuctionGetting Figma Node ID callback

Also, most of the RectangleNode fields are supported as props.

Example

<Rectangle
height={100}
width={200}
/>