Skip to main content

Configure the following properties on the Text component.

Anchor to color
color
Default: 'base'

The color intensity of the text. Controls how prominent or subtle the text appears within the interface.

string

A unique identifier for the element used for targeting with CSS, JavaScript, or accessibility features.

| 'auto' | 'neutral' | 'info' | 'success' | 'caution' | 'warning' | 'critical'
Default: 'auto'

Determines the visual appearance and semantic meaning of the text. Available options:

  • 'auto' - Lets the system automatically choose the appropriate tone based on context. Use when you want the system to determine the most appropriate styling.
  • 'neutral' - Gray styling for general status information that doesn't require emphasis. Use for general status updates and standard information.
  • 'info' - Blue styling for informational content and neutral updates. Use for informational content that provides helpful context.
  • 'success' - Green styling for positive states, completed actions, and successful operations. Use for positive outcomes and successful processes.
  • 'caution' - Yellow styling for situations that need attention but aren't urgent. Use for potential issues that require awareness.
  • 'warning' - Orange styling for important notices that require merchant awareness. Use for situations that need attention but aren't critical.
  • 'critical' - Red styling for errors, failures, and urgent issues requiring immediate action. Use for urgent issues that need immediate merchant attention.
'strong' | 'small' | 'generic'
Default: 'generic'

The semantic meaning and default styling of the text. Other presentation properties override the default styling provided by the type. Available options:

  • 'generic' - The default text type for general content without specific semantic meaning or emphasis.
  • 'strong' - A text type that provides emphasis and importance, typically rendered with increased font weight or visual prominence.
  • 'small' - A text type for secondary or supplementary content, typically rendered with reduced size for captions, fine print, or less important information.

Anchor to Display text with visual stylesDisplay text with visual styles

Display text content using a text component with customizable visual styles and tones. This example shows basic text with appropriate emphasis and hierarchy.

Display text with visual styles

Display text content using a text component with customizable visual styles and tones. This example shows basic text with appropriate emphasis and hierarchy.

Display text with visual styles

<s-text>
<s-text type="strong">Name:</s-text> Jane Doe
</s-text>

  • Choose semantic types: Use strong for emphasis, small for secondary info, generic for standard text.
  • Apply appropriate tones: Use success for positive outcomes, warning or critical for alerts, info for helpful context, auto for neutral content.
  • Balance color intensity: Use strong for emphasis, base for readability, subdued for secondary info.
  • Nest for mixed formatting: Nest text components when you need multiple styles within one text block.

Complex rich text formatting isn't supported—use multiple text components or nested text elements for varied formatting needs.


Was this page helpful?