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.
Anchor to PropertiesProperties
Configure the following properties on the badge component.
- Anchor to colorcolorcolor"base" | "strong""base" | "strong"Default: 'base'Default: 'base'requiredrequired
Controls the visual weight and emphasis of the badge.
base: Standard weight with moderate emphasis, suitable for most use cases.strong: Increased visual weight for higher emphasis and prominence.
- Anchor to iconiconiconrequiredrequired
An icon displayed inside the badge to provide additional visual context or reinforce the badge's meaning. Accepts any icon name from the icon library or a custom string identifier.
- Anchor to sizesizesize"base" | "large" | "large-100""base" | "large" | "large-100"Default: 'base'Default: 'base'requiredrequired
The size of the badge.
base: Default size suitable for most badge use cases.large: Larger badge for increased visibility and prominence.large-100: Extra large badge for maximum visibility in emphasized contexts.
- Anchor to tonetonetone"info" | "success" | "warning" | "critical" | "auto" | "neutral" | "caution""info" | "success" | "warning" | "critical" | "auto" | "neutral" | "caution"Default: 'auto'Default: 'auto'requiredrequired
The semantic meaning and color treatment of the component.
info: Informational content or helpful tips.success: Positive outcomes or successful states.warning: Important warnings about potential issues.critical: Urgent problems or destructive actions.auto: Automatically determined based on context.neutral: General information without specific intent.caution: Advisory notices that need attention.
Anchor to SlotsSlots
The badge component supports slots for additional content placement within the component. Learn more about using slots.
- Anchor to childrenchildrenchildrenHTMLElementHTMLElement
The text label displayed within the badge component, typically a short status indicator or category label.
Anchor to ExamplesExamples
Anchor to Add status badges with tonesAdd status badges with tones
Create badges with different tones to represent statuses. This example shows the tones auto (implicit default), info, success, caution, warning, and critical.
Preview
html
Anchor to Add icons to status badgesAdd icons to status badges
Combine tones with icons to provide stronger visual cues. This example shows product and inventory status badges with icons that reinforce meaning.
Preview
html
Anchor to Display badges in a tableDisplay badges in a table
Place badges inside table cells to give merchants a scannable overview of status information. This example shows fulfillment and payment badges in an order table.
Preview
html
Anchor to Control badge size for emphasisControl badge size for emphasis
Use the size property to create visual hierarchy between badges. This example shows the base size for standard usage and the large size for badges that need more prominence.
Preview
html
Anchor to Best practicesBest practices
- Choose the right size: Use
basesize in table cells, list items, or when showing multiple badges together. Uselargesize for standalone badges that need emphasis, like a primary status indicator at the top of a page. - Keep labels to 1-2 words: Use concise labels like Fulfilled, Partially refunded, or Out of stock. Always use past tense for status labels: Refunded not Refund.
- Use appropriate tones: Apply
criticalfor errors or urgent issues needing action,warningfor problems requiring attention,successfor positive confirmations, andinfofor neutral statuses. Use consistent tones for the same status across your app. - Position in content flow: Place badges adjacent to the items they describe. In list items, position them near the title. In tables, place them in their own column for scannability.
- Know when not to use badges: Badges are static, system-generated indicators. Don't use badges for merchant-created tags or removable items.
Anchor to LimitationsLimitations
- Badge text truncates with an ellipsis when it exceeds the available width. Truncated text isn't accessible via tooltip, so keep labels concise.
- Badge text never wraps to multiple lines. Long labels will truncate rather than expand the badge height.
- Only specific predefined icons from the admin icon set are supported. Custom icons or images can't be used. The icon always appears to the left of the text and can't be repositioned.