Skip to main content

Badge

The badge component displays status information or indicates completed actions through compact visual indicators. Use badges to communicate object states, order statuses, or system-generated classifications that help buyers 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.

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

Support
Targets (29)

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.

'small' | 'base' | '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 badges with different tonesShow badges with different tones

Render badges with different visual treatments. This example shows three s-badge elements: one with the default appearance, one with tone="critical", and one with color="subdued".

Show badges with different tones

A rendered example of the badge component

html

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

Anchor to Add an icon to a badgeAdd an icon to a badge

Add an icon beside a badge label to reinforce its meaning. This example sets icon, iconPosition, and size on s-badge.

html

<s-badge size="small" icon="delivery" iconPosition="start">
Arrives Wed
</s-badge>

Anchor to Group multiple status badgesGroup multiple status badges

Lay out several badges in one horizontal row. This example nests three s-badge elements with default, neutral, and critical tones inside an s-stack.

html

<s-stack direction="inline" gap="small">
<s-badge>Paid</s-badge>
<s-badge tone="neutral">Processing</s-badge>
<s-badge tone="critical">Requires action</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 "Paid", "Free", "Expired", or "Processing" 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?