Badge
A compact label for status, counts or tags, with six variants and four status tints.
Available in
Angular: available Vue: available React: available React Native: available
Usage
DefaultSecondaryOutlineGhostDestructive
RecordingTranscribedExportedPausedSyncing
312899+Local onlyInteractive
design roadmap
<div class="demo-stack">
<div class="demo-row" style="align-items: center">
<span soneBadge>Default</span>
<span soneBadge variant="secondary">Secondary</span>
<span soneBadge variant="outline">Outline</span>
<span soneBadge variant="ghost">Ghost</span>
<span soneBadge variant="destructive">Destructive</span>
</div>
<div class="demo-row" style="align-items: center">
<span soneBadge variant="live" dot>Recording</span>
<span soneBadge variant="accent" dot>Transcribed</span>
<span soneBadge variant="success" dot>Exported</span>
<span soneBadge variant="warning" dot>Paused</span>
<span soneBadge variant="info" dot>Syncing</span>
</div>
<div class="demo-row" style="align-items: center">
<span soneBadge variant="count">3</span>
<span soneBadge variant="count">128</span>
<span soneBadge variant="destructive">99+</span>
<button soneBadge variant="outline" type="button">Filter: Design</button>
<span soneBadge variant="dashed">Local only</span>
<span soneBadge variant="secondary" interactive>Interactive</span>
</div>
<div class="demo-row" style="align-items: center">
<span soneBadge variant="secondary">
design
<button soneBadgeRemove aria-label="Remove design"><sone-icon icon="close" /></button>
</span>
<span soneBadge variant="accent">
roadmap
<button soneBadgeRemove aria-label="Remove roadmap"><sone-icon icon="close" /></button>
</span>
</div>
</div>Import
import {
SoneBadgeDirective,
SoneBadgeRemoveDirective,
} from "@surface-one/angular/badge";API reference
SoneBadgeDirectiveDirective
| Name | Type | Default |
|---|---|---|
variant | BadgeVariant | "default" |
dotA leading status dot in the badge's colour (the `<span class="badge-dot">` part, drawn for you). | boolean | false |
interactiveThe badge reacts to the pointer (hover fill, pointer cursor) like a link or button badge — for a badge whose clickable parent is not itself the badge. | boolean | false |
SoneBadgeRemoveDirectiveDirective
`button[soneBadgeRemove]` — the remove button inside a removable badge (a tag chip). Put the glyph inside (`<sone-icon icon="close" />`) and name it by what it removes: `aria-label="Remove design"`. `type` defaults to `button`.