Display
Chip
Toggleable filter pill. Pressable when onClick is set; static span otherwise.
Examples
Filter strip
{#each [['epub', 942], ['pdf', 248], ['txt', 14]] as [name, n]}
<Chip
active={formats.has(name)}
onClick={() => toggle(name)}
count={n}
>
{name.toUpperCase()}
</Chip>
{/each}Static (non-interactive)
EPUB PDF 4
<Chip>EPUB</Chip>Props
| Prop | Type | Default | Description |
|---|---|---|---|
active | boolean | false | Filled accent state when true. |
count | number | — | Optional small count after the label. |
onClick | () => void | — | When set, renders as <button> with hover/focus chrome. |
disabled | boolean | false | Native disabled state for interactive chips. |
ariaLabel | string | — | Accessible name override. |
Install
CLI
npx @a3tai/mittsu add chip