Lynx
Text
Text component is a component that renders text by applying Crispy typography tokens in Lynx.
Installation
Usage
Text renders Lynx native <text>. textStyle applies the Crispy typography token corresponding to Figma Text Style at once.
In Lynx, text must always be inside a <text> element. Text does not hide this constraint and renders the native text element directly suited for Lynx.
Props
Prop
Type
color?ScopedColorFg | ScopedColorPalette | (string & {}) | undefinedfontSize?(string & {}) | "t1" | "t2" | "t3" | "t4" | "t5" | "t6" | "t7" | "t8" | "t9" | "t10" | "t11" | "t12" | "t13" | "t14" | "t1Static" | "t2Static" | "t3Static" | "t4Static" | "t5Static" | "t6Static" | "t7Static" | "t8Static" | "t9Static" | "t10Static" | "t11Static" | "t12Static" | "t13Static" | "t14Static" | undefinedlineHeight?(string & {}) | "t1" | "t2" | "t3" | "t4" | "t5" | "t6" | "t7" | "t8" | "t9" | "t10" | "t11" | "t12" | "t13" | "t14" | "t1Static" | "t2Static" | "t3Static" | "t4Static" | "t5Static" | "t6Static" | "t7Static" | "t8Static" | "t9Static" | "t10Static" | "t11Static" | "t12Static" | "t13Static" | "t14Static" | undefinedfontWeight?"regular" | "medium" | "bold" | undefinedtextStyle?TextStyle | undefinedalign?"left" | "center" | "right" | undefinedstyle?CSSProperties | undefinedchildren?React.ReactNodeclassName?string | undefinedText Styles
If more specific adjustment is needed, you can use fontSize, lineHeight, fontWeight, and align.
If you specify only fontSize and omit lineHeight, the line-height token of the same level is also used.
Differences from Web Version
Lynx Text has the following differences from React Text:
- Does not support
asorasChild. Always renders Lynx native<text>. maxLines,whiteSpace,userSelect, andtextDecorationLineare not yet provided.- Does not use the web
.seed-textpattern that relies on CSSinherit. Instead, appliescolor,fontSize,lineHeight,fontWeight, andtextAligndirectly as object styles.