Components / Data display
Badge
A small status pill with an intent colour.
@ruckc/truss-ui Data display
Import
import { Badge } from '@ruckc/truss-ui'; Playground
intent
API
| Prop | Type | Default | Description |
|---|---|---|---|
intent | Intent | 'neutral' | Semantic colour: `primary`, `neutral`, `success`, `warning` or `danger`. |
dot | boolean | true | Shows a status dot; hidden when an icon is given. |
icon | IconSource | — | A built-in glyph name, a `{ path, viewBox? }` definition or a snippet. Replaces the dot. |
iconSnippet snippet | Snippet | — | Custom leading content (e.g. your own `<svg>`); replaces the dot and wins over `icon`. |
children required snippet | Snippet | — | Content, as a Svelte snippet. |