Badge
Lightweight label for displaying highlighted information with color variants.
Badge
Design lines
NEW
vue
1<Tabs defaultValue="tuix">2 <TabsList>3 <Tab value="tuix">TUIX</Tab>4 <Tab value="rubik">Rubik</Tab>5 </TabsList>6 <TabPanel value="tuix">7 <Badge color="primary" design="tuix">NEW</Badge>8 </TabPanel>9 <TabPanel value="rubik">10 <Badge color="primary" design="rubik">NEW</Badge>11 </TabPanel>12</Tabs>Demo
Color (color)
All semantic color variants, from primary to dark.
primarysecondarytertiarysuccesswarningdangerlightmediumdark
vue
1<Badge color="primary">primary</Badge>2<Badge color="secondary">secondary</Badge>3<Badge color="tertiary">tertiary</Badge>4<Badge color="success">success</Badge>5<Badge color="warning">warning</Badge>6<Badge color="danger">danger</Badge>7<Badge color="light">light</Badge>8<Badge color="medium">medium</Badge>9<Badge color="dark">dark</Badge>Content (default slot)
Text passed through the default slot becomes the badge content.
vue
1<Badge>NEW</Badge>2<Badge>v2.1.0</Badge>3<Badge>beta</Badge>Props
color
Defines the semantic color of the badge.
| Type | Default | Required |
|---|---|---|
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark' | 'primary' | ❌ |
design
Design line (or inherit from data-design).
| Type | Default | Required |
|---|---|---|
'tuix' | 'rubik' | — (inherits from data-design) | ❌ |
Slots
| Slot | Description |
|---|---|
default | Badge content (text, icons, etc.). |
CSS Custom Properties
| Token | Default | Description |
|---|---|---|
--font-mono | "JetBrains Mono", ui-monospace, monospace | Monospace font stack for code-like content (key labels, log lines, chips). |
--bg-panel | from theme (--ctp-latte-surface1 / --ctp-mocha-surface1) | Background of panel-like raised surfaces (cards, accordions). |
Ver Theming para la convención completa.