Badge
Primitives[atlasBadge]Examples
Variants
Badges label status or categories. Apply atlasBadge to any inline element; success , warning and info cover states, and a leading dot or atlas-icon is spaced from the text.
PrimaryDefaultSecondaryOverduePaidPendingNewDraft Online
In context
A badge next to a heading or inside a list row keeps status visible without extra chrome.
- Order #1042Paid
- Order #1043Pending
- Order #1044Failed
Links
On a <span> a badge is static. On an <a> it gets a hover shade and a focus ring — for tags that link to their list. For toggles and filters use atlas-toggle-group instead: a badge is not a control.
API
Generated from the library source, so it always matches the code.
AtlasBadgeDirective [atlasBadge]
| Input | Type | Default | Description |
|---|---|---|---|
| variant | BadgeVariants['variant'] | 'primary' | primary , secondary , default (neutral with a border), outline , or a status: success , warning , info , destructive . Do not rely on colour alone: the text must say the status. |
| class | string | '' | cn() ; yours win on conflicts. |
Types
BadgeVariants
type BadgeVariants = VariantProps<typeof badgeVariants>