Feedback
Badge
A compact label for status and counts.
DraftActivePendingFailedNew
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
Copy
import { JBadge } from '@juxtui/ui'Usage #
Copy
<JBadge variant="success" dot>Operational</JBadge>accent is the only solid badge — reserve it for the one thing on screen that should pull the eye.
Variants & examples #
Status#
With dot, a badge drops its fill and becomes a state: text first, colour only in the marker.
OfflineOperationalDegradedOutage
Sizes#
SmallMediumv0.1.012 files
API #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'neutral' | 'success' | 'warning' | 'destructive' | 'accent' | 'neutral' | Meaning and colour. |
| size | 'sm' | 'md' | 'md' | Height: 17 or 20px. |
| dot | boolean | false | Status style: plain text led by a small square marker, without a fill. |
Slots
| Slot | Props | Description |
|---|---|---|
| default | — | Label. |
| leading | — | Icon (ignored when dot is set). |
Accessibility #
- A badge is plain text in a
<span>. Don’t rely on colour alone — the label should carry the meaning. - For counts that update live, wrap them in your own
aria-liveregion.