Line
Wrapper for the Figma Line.
Props
Prop | Type | Default | Note |
---|---|---|---|
name | String | The name to be displayed in the Figma Layers List | |
strokeWeight | Number | ||
strokes | Array of Paint | ||
style | Style | Not all props | |
onSelectionEnter | Function | Selection enter event callback | |
onSelectionLeave | Function | Selection leave event callback | |
onLayout | Function | Event is fired once the layout has been calculated | |
onNodeId | Fuction | Getting Figma Node ID callback |
Also, most of the LineNode fields are supported as props.
Example
<Line
name="line"
strokeWeight={4}
strokeAlign="CENTER"
opacity={0.5}
strokes={[{ type: 'SOLID', color: { r: 1, g: 0, b: 1 } }]}
strokeCap="ROUND"
dashPattern={[2, 10, 2, 10]}
/>