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
Prop | Type | Default | Note |
---|---|---|---|
name | String | The name to be displayed in the Figma Layers List | |
children | String | Text content | |
style | Style | ||
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 | |
hyperlink | HyperlinkTarget | Hyperlink (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>