Skip to content

Badge

Category: Feedback

<Badge>Default</Badge>
<Badge tone="success" variant="soft">Active</Badge>
<Badge tone="danger" variant="solid" size="sm">3</Badge>

Install: @helix-ui/core

import { Badge } from '@helix-ui/core';

status: stable · since: 0.1.0

Tags: label, count, status, pill, chip

Open the full editor or source on GitHub.

( New ) ( 3 ) ( beta ) ← small pill of text
  • display — inline-block
  • width — content
  • height — content
  • intrinsicSize — ~16-22px tall, hugs text
  • stackable — true
  • fullBleed — false

A small pill (radius.full) with a tone-tinted background and matching foreground text. Compact font (font.size.xs) with semibold weight. Solid / soft / outline variants control emphasis. Often used inline next to a heading or appended to a list item.

Name Type Default Description
tone 'neutral' | 'brand' | 'danger' | 'success' | 'warning' neutral Color intent.
variant 'soft' | 'solid' | 'outline' soft Visual treatment.
size 'sm' | 'md' | 'lg' md Badge size. sm for compact inline chips, md for section eyebrows / statuses, lg for prominent hero / featured-card headers (uppercase by default).

color.bg.action.brand.subtle, color.bg.action.brand.default, color.bg.action.danger.subtle, color.bg.action.danger.default, color.bg.action.success.subtle, color.bg.action.success.default, color.bg.action.warning.subtle, color.bg.action.warning.default, color.bg.action.neutral.default, color.bg.surface.inverse, color.text.action.brand, color.text.action.danger, color.text.action.success, color.text.action.warning, color.text.primary, color.text.inverse, color.text.on.brand, color.text.on.danger, color.text.on.success, color.text.on.warning, radius.full, space.1, space.2, space.3

Notes

  • Color alone is not enough — pair the tone with a clear text label.
  • For dynamic counts, place the badge near content it relates to via aria-describedby.
Component Relation Note
Sidebar child Often appears as Sidebar.Item.trailing.
List child Common in trailing slot of a List row.
Tabs child Counts next to tab labels.

These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.

“a green New badge”

<Badge tone="success">New</Badge>

“show “12” as a count badge”

<Badge tone="brand" variant="solid">
12
</Badge>