Display
Chip
Compact element for tags, filters and status labels, with icons, color variants, selection and deletion.
<script>
import { Chip, StatusChip } from "@codeatlasdev/ui";
</script>
<Chip label="Design" variant="brand" deletable ondelete={remove} />
<StatusChip status="success" label="Active" />
A chip becomes a keyboard-focusable toggle button when onclick is set: Enter and Space activate it and aria-pressed follows selected. StatusChip is a separate, non-interactive component for dot + label statuses.
Basic
Design System Svelte 5 Bits UI
Code
Variants and size
Semantic variants and the compact `sm` size.
Default Brand Success Warning Error Info Small
Code
With icons
Pass any Lucide icon component to `icon`.
Featured Boosted Tagged
Code
Selectable
Set `onclick` to make the chip a toggle.
Code
Deletable
Click the × button to remove a tag.
Code
StatusChip
Semantic status indicators with dot and label.
Active Pending Failed Scheduled Draft
Code
Chip props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | – | Text content of the chip. Required. |
icon | Component | undefined | Icon component rendered before the label. |
variant | 'default' | 'success' | 'error' | 'warning' | 'info' | 'brand' | 'default' | Color variant. |
size | 'sm' | 'md' | 'md' | Chip size. |
selected | boolean | false | Selected visual state, exposed as `aria-pressed` on interactive chips. |
deletable | boolean | false | Shows a × remove button. |
onclick | () => void | undefined | Makes the chip interactive (button role, focusable). |
ondelete | () => void | undefined | Called when the × button is clicked. |
class | string | '' | Extra class names. |
StatusChip props
| Prop | Type | Default | Description |
|---|---|---|---|
status | 'success' | 'warning' | 'error' | 'info' | 'neutral' | – | Semantic status. Required. |
label | string | – | Text shown next to the dot. Required. |
class | string | '' | Extra class names. |