Skip to main content

Paragraph

The paragraph component displays blocks of text content and can contain inline elements like buttons, links, or emphasized text. Use paragraph to present standalone blocks of readable content, descriptions, or explanatory text.

Paragraphs can wrap inline components to create rich, formatted content blocks. For inline text styling, use text.

Paragraph doesn't support text truncation or maxLines. Manage overflow with a parent layout component.

Support
Targets (29)

Configure the following properties on the paragraph component.

Anchor to accessibilityVisibility
accessibilityVisibility
'visible' | 'hidden' | 'exclusive'
Default: 'visible'

Controls how the element is exposed to sighted users and to assistive technologies such as screen readers.

  • visible: The element is visible to all users (both sighted users and screen readers).
  • hidden: The element is visually visible but hidden from screen readers. Use this for decorative elements that don't provide meaningful information.
  • exclusive: The element is visually hidden but announced by screen readers. Use this for screen-reader-only content like skip links or additional context.
Anchor to color
color
'base' | 'subdued'
Default: 'base'

The color emphasis level that controls visual intensity.

  • subdued: Deemphasized color for secondary text, supporting labels, and less critical interface elements.
  • base: Primary color for body text, standard UI elements, and general content with good readability.
  • strong: Emphasized color for headings, key labels, and interactive elements that need prominence.
'ltr' | 'rtl' | 'auto' | ''
Default: ''

Indicates the directionality of the element’s text.

  • ltr: The languages written from left to right (such as English).
  • rtl: The languages written from right to left (such as Arabic).
  • auto: The user agent determines the direction based on the content.
  • "": The direction is inherited from parent elements (equivalent to not setting the attribute).

Learn more about the dir attribute.

string

A unique identifier for the element. Use this to reference the element in JavaScript, link labels to form controls, or target specific elements for styling or scripting.

string
Default: ''

The language of the text content. Use this when the text is in a different language than the rest of the page, allowing assistive technologies such as screen readers to invoke the correct pronunciation.

The value should be a valid language subtag from the IANA language subtag registry.

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.

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

The semantic meaning and color treatment of the component.

  • auto: Automatically determined based on context.
  • neutral: General information without specific intent.
  • info: Informational content or helpful tips.
  • success: Positive outcomes or successful states.
  • caution: Advisory notices that need attention.
  • warning: Important warnings about potential issues.
  • critical: Urgent problems or destructive actions.
  • accent: Highlighted or promotional content.
  • custom: Custom styling controlled by your theme.
'small' | 'paragraph'
Default: 'paragraph'

The semantic type and styling treatment for the paragraph content.

Other presentation properties on s-paragraph override the default styling.

  • paragraph: A semantic type that indicates the text is a structural grouping of related content.
  • small: A semantic type that indicates the text is considered less important than the main content, but is still necessary for the reader to understand.

Anchor to Display a basic paragraphDisplay a basic paragraph

Render a block of body text with a shipping estimate message. This example displays an s-paragraph with default styling for a delivery timeframe.

Display a basic paragraph

A rendered example of the paragraph component

html

<s-paragraph>Ship in 1-2 business days.</s-paragraph>

Anchor to Use tone and color to style messagingUse tone and color to style messaging

Apply semantic color and muted styling to delivery messaging. This example combines tone="warning" with color="subdued" so the warning reads clearly without shouting.

html

<s-paragraph tone="warning" color="subdued">
We can't ship to this address. Update your details to continue.
</s-paragraph>

Anchor to De-emphasize text using colorDe-emphasize text using color

De-emphasize legal or tax copy that must appear but shouldn't dominate the layout. This example sets color="subdued" on s-paragraph for text below the order total.

html

<s-paragraph color="subdued">
Prices are in USD and include applicable taxes. Shipping costs are calculated
at checkout based on your delivery address.
</s-paragraph>

Anchor to Style inline text within a paragraphStyle inline text within a paragraph

Emphasize specific words within body text by nesting s-text inside s-paragraph. This example wraps a delivery timeframe in s-text with type="strong" to draw attention while keeping the surrounding text at default weight.

html

<s-paragraph>Your order will arrive in <s-text type="strong">1-2 business days</s-text>. Free shipping on all orders over $50.</s-paragraph>

  • Use paragraph for block-level text: Wrap body copy and descriptions in s-paragraph. Use s-text inside paragraphs to style specific words or phrases.
  • Apply tone for semantic meaning: Set tone="warning" or tone="critical" to convey urgency rather than relying on color alone.
  • Create visual hierarchy with color: Use color="subdued" for less important text like disclaimers and fine print.
  • Keep paragraphs focused: Limit each paragraph to a single idea so buyers can scan content quickly.
  • Layer tone and color deliberately: Pair tone with color only when the combination still meets contrast and readability needs.

Was this page helpful?