Skip to main content

Badge

The badge component displays status information or indicates completed actions through compact visual indicators. Use badge to communicate object states, order statuses, or system-generated classifications that help users quickly understand item conditions.

Badges support multiple tones and sizes, with optional icons to reinforce status meaning and improve scannability in lists and tables. For user-created labels, categories, or tags, use chip instead. For prominent, dismissible messages that require customer action, use banner.

Badges are read-only indicators. They can't contain links, buttons, or other interactive elements.

Support
Targets (24)

Configure the following properties on the badge component.

Anchor to color
color
'base' | 'subdued'
Default: 'base'

Controls the visual weight and emphasis of the badge.

  • base: Standard weight with moderate emphasis, suitable for most use cases.
  • subdued: Reduced visual weight for less prominent or secondary badges.
'' |
Default: ''

An icon displayed inside the badge to provide additional visual context or reinforce the badge's meaning. Set to an empty string to display no icon.

Anchor to iconPosition
iconPosition
'start' | 'end'

The position of the icon relative to the badge text.

  • start: Places the icon before the text.
  • end: Places the icon after the text.
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.

'base' | 'small' | 'small-100'
Default: 'base'

The size of the badge.

  • base: The default size, suitable for most use cases.
  • small: A smaller badge for compact layouts.
  • small-100: The smallest badge for tight spaces or dense lists.
'auto' | 'neutral' | 'critical'
Default: 'auto'

The semantic meaning and color treatment of the badge.

  • auto: Automatically determined based on context.
  • neutral: General information without specific intent.
  • critical: Urgent problems or destructive actions.

Anchor to Show an order statusShow an order status

Display badges to communicate statuses. This example renders badges in default, critical, and neutral tones with single word labels.

Show an order status

A small status badge displaying a label in a colored pill shape.

html

<s-badge color="subdued">Default</s-badge>
<s-badge tone="critical">Expired</s-badge>
<s-badge>Free</s-badge>

Anchor to Indicate a subscription statusIndicate a subscription status

Place a badge alongside related content to provide status context. This example shows a "Paused" badge with color="subdued" next to subscription details.

html

<s-stack direction="block" gap="small-200">
<s-heading>Subscription</s-heading>
<s-text>Mini garden seeds</s-text>
<s-stack direction="block" gap="small-200">
<s-text type="strong">$35.00 monthly</s-text>
<s-badge color="subdued">Paused</s-badge>
</s-stack>
</s-stack>

Anchor to Highlight a critical statusHighlight a critical status

Use the critical and warning tones to draw attention to statuses that require customer action. This example pairs a critical badge with an icon and a warning badge side by side.

html

<s-stack direction="inline" gap="small-400">
<s-badge tone="critical" icon="alert-triangle">Action required</s-badge>
<s-badge tone="critical">Expiring soon</s-badge>
</s-stack>

  • Keep badge labels short: Aim for one word per badge. For complex states that require two words, use sentence case.
  • Use descriptive adjectives or past-tense verbs: Labels like "Available", "Complete", "Delivered", or "Delayed" communicate status clearly.
  • Match tone to urgency: Use neutral for standard indicators and critical for urgent statuses. Adjust visual intensity with the color property — subdued reduces emphasis while base keeps the default appearance.
  • Always attribute badges to an object: A badge should appear alongside the item it describes, such as an order, subscription, or product.

Was this page helpful?