Text
Displays inline text with specific visual styles or tones. Use to emphasize or differentiate words or phrases within a Paragraph or other block-level components.
Anchor to propertiesProperties
- Anchor to accessibilityVisibilityaccessibilityVisibility'visible' | 'hidden' | 'exclusive'Default: 'visible'
Changes the visibility of the element.
visible
: the element is visible to all users.hidden
: the element is removed from the accessibility tree but remains visible.exclusive
: the element is visually hidden but remains in the accessibility tree.
- Anchor to colorcolor'base' | 'subdued'
Modify the color to be more or less intense.
- 'ltr' | 'rtl' | 'auto' | ''Default: ''
Indicates the directionality of the element’s text.
ltr
: languages written from left to right (e.g. English)rtl
: languages written from right to left (e.g. Arabic)auto
: the user agent determines the direction based on the content''
: direction is inherited from parent elements (equivalent to not setting the attribute)
- Anchor to displaydisplay'auto' | 'none'Default: 'auto'
Sets the outer display type of the component. The outer type sets a component’s participation in flow layout.
auto
: the component’s initial value. The actual value depends on the component and context.none
: hides the component from display and removes it from the accessibility tree, making it invisible to screen readers.
- string
A unique identifier for the element.
- Anchor to langlangstringDefault: ''
Indicate the text language. Useful when the text is in a different language than the rest of the page. It will allow assistive technologies such as screen readers to invoke the correct pronunciation. Reference of values ("subtag" label)
It is recommended to combine it with the
dir
attribute to ensure the text is rendered correctly if the surrounding content’s direction is different.- Anchor to tonetone'custom' | 'success' | 'auto' | 'neutral' | 'info' | 'warning' | 'critical'
Sets the tone of the component, based on the intention of the information being conveyed.
- Anchor to typetype'small' | 'address' | 'mark' | 'strong' | 'generic' | 'redundant' | 'emphasis' | 'offset'
Provide semantic meaning and default styling to the text.
Other presentation properties on
<s-text>
override the default styling.
TextProps
- accessibilityVisibility
Changes the visibility of the element. - `visible`: the element is visible to all users. - `hidden`: the element is removed from the accessibility tree but remains visible. - `exclusive`: the element is visually hidden but remains in the accessibility tree.
'visible' | 'hidden' | 'exclusive'
- color
Modify the color to be more or less intense.
'base' | 'subdued'
- dir
Indicates the directionality of the element’s text. - `ltr`: languages written from left to right (e.g. English) - `rtl`: languages written from right to left (e.g. Arabic) - `auto`: the user agent determines the direction based on the content - `''`: direction is inherited from parent elements (equivalent to not setting the attribute)
'ltr' | 'rtl' | 'auto' | ''
- display
Sets the outer display type of the component. The outer type sets a component’s participation in [flow layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flow_layout). - `auto`: the component’s initial value. The actual value depends on the component and context. - `none`: hides the component from display and removes it from the accessibility tree, making it invisible to screen readers.
'auto' | 'none'
- id
A unique identifier for the element.
string
- lang
Indicate the text language. Useful when the text is in a different language than the rest of the page. It will allow assistive technologies such as screen readers to invoke the correct pronunciation. [Reference of values](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) ("subtag" label) It is recommended to combine it with the `dir` attribute to ensure the text is rendered correctly if the surrounding content’s direction is different.
string
- tone
Sets the tone of the component, based on the intention of the information being conveyed.
'custom' | 'success' | 'auto' | 'neutral' | 'info' | 'warning' | 'critical'
- type
Provide semantic meaning and default styling to the text. Other presentation properties on `<s-text>` override the default styling.
'small' | 'address' | 'mark' | 'strong' | 'generic' | 'redundant' | 'emphasis' | 'offset'
export interface TextProps extends Pick<TextProps$1, 'accessibilityVisibility' | 'color' | 'dir' | 'display' | 'id' | 'lang' | 'tone' | 'type'> {
color?: Extract<TextProps$1['color'], 'subdued' | 'base'>;
tone?: Extract<TextProps$1['tone'], 'auto' | 'neutral' | 'info' | 'success' | 'warning' | 'critical' | 'custom'>;
type?: Extract<TextProps$1['type'], 'address' | 'redundant' | 'mark' | 'emphasis' | 'offset' | 'small' | 'strong' | 'generic'>;
}
Code
examples
Code
<s-text type="small" color="subdued"> All transactions are secure and encrypted </s-text>
Preview

Anchor to useful-forUseful for
- Adding inline text elements such as labels or line errors.
- Applying different visual tones and text styles to specific words or phrases within a
s-paragraph
, such as astrong
type orcritical
tone.
Anchor to best-practicesBest practices
- Use plain and clear terms.
- Don’t use jargon or technical language.
- Don’t use different terms to describe the same thing.
- Don’t duplicate content.