Text

Analog of Text component at React Native, React Sketchapp. Wrapper for Figma Text. Text component supports autoloading fonts defined through fontFamily, fontWeight, fontStyle props.

Props

PropTypeDefaultNote
nameStringThe name to be displayed in the Figma Layers List
childrenStringText content
styleStyle
onSelectionEnterFunctionSelection enter event callback
onSelectionLeaveFunctionSelection leave event callback
onLayoutFunctionEvent is fired once the layout has been calculated
onNodeIdFuctionGetting Figma Node ID callback
hyperlinkHyperlinkTargetHyperlink (to URL or node)

Also, most of the TextNode fields supported as props.

Example

<Text
style={{
fontSize: 24,
fontFamily: 'Helvetica',
fontWeight: 'bold',
color: '#01ffae',
}}
>
Hello World!
</Text>