Code
Props
children
string
✅
className
string
❌
align
string (Left, Right, Center, Justify)
❌
textStyle
string (Mouse, SmCaps, Body, BodyLg, Heading2, Heading1, Title2, Title2)
❌
muted
boolean
❌
contrast
boolean
❌
How to Use
Text is a dynamic component that allows developer to have controll over the HTML tag to be inserted in the application, at the same time it facilitates basic text styles, siptser typests and it is connected by default to the sds-theme css tokens.
The available text HTML tags are the fokllowings:
h1, h2, h3, h4, h5, h6
p
span
The previous code is going to look like the following once it is rendered
This component is just facilitating standard HTML text tags with already included sds-theme tokens. Its use is not mandatory but it can result as a very useful tool for developers at facilitating sds typeset styles by default.
Live Demo
For detailed code usage documentation, see the Storybooks for each framework below.
React
Last updated