Text
Last updated: 2.2.0 (03/02/2024)
Last updated
Was this helpful?
Last updated: 2.2.0 (03/02/2024)
Last updated
Was this helpful?
The Text component is a markdown-compatible paragraph wrapper that is particularly handy when dealing with formatting for internationalization.
This component forms the back-bone of all components that render text, including the , , , etc.
- line break/newline
***{...}***
- bold & italicized text
**{...}**
- bold text
*{...}*
- italicized text
`{...}`
- monospace text
<hl>{...}</hl>
- highlighted text
Extends GenericProps
, GenericClickableProps
and PolymorphicTextProps
.
family
CSSProperties["fontFamily"]
Sets font-family
css property.
weight
CSSProperties["fontWeight"]
Sets font-weight
css property.
fontSize
CSSProperties["fontSize"]
Sets font-size
css property.
align
CSSProperties["textAlign"]
Sets text-align
css property.
transform
CSSProperties["textTransform"]
Sets text-transform
css property.
size
ComponentSize
Sets the size of the text.
color
CSSProperties["color"]
Sets color
css property.
italic
boolean
Shorthand for font-style: italic
.
bold
boolean
Shorthand for font-weight: 800
.
monospace
boolean
Shorthand for font-family: monospace
.
highlightColor
CSSProperties["color"]
Sets the color of highlighted sections.
highlightStyle
CSSProperties
Optional styles to pass to highlighted sections.
2.2.0: Added the <hl>
syntax, and the highlightColor
and highlightStyle
props.
The font family will need to be correctly installed before use. .