FilterChips
moleculesOne row of filter chips with counts for "pick one of N" (or several): scrolls with an edge fade when it overflows, or collapses to a single dropdown chip.
Library status filter
options with count, bind:value and a label naming the group; arrows, Home and End move the selection.
Several at once
multiple binds a string[] and renders aria-pressed toggles; a count of 0 is shown, a disabled option is skipped; size="md" for roomier rows.
Overflow
collapse="never" keeps the row: it scrolls sideways and fades only an edge that hides chips, and the selected chip is scrolled into view. A row that fits has no fade.
Dropdown chip
collapse="always" is one chip that opens a menu of checkable items; the default collapse="auto" switches to it when the chips do not fit (drag the handle), at the same height.
Filter in the URL
href={(id) => string} renders each chip as a real link with aria-current; urlState keeps the ?status= param so the filter survives a reload and can be shared.
Which control
Page views = Tabs, filters = FilterChips, two-state display toggles = SegmentedControl.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
options required | FilterChipOption[] | — | |
value bindable | string | string[] | — | The selected id, or the selected ids with `multiple`. |
multiple | boolean | false | |
label required | string | — | Accessible name of the group. |
size | 'sm' | 'md' | 'sm' | |
onchange | (value: string | string[]) => void | — | Fires after a selection (click, keyboard or menu). |
href | (id: string) => string | — | Chips become real links (`<a aria-current>`): middle-click opens the chip's URL in a new tab. |
collapse | 'auto' | 'never' | 'always' | 'auto' | `auto` swaps the row for one dropdown chip when the chips do not fit; `never` scrolls the row instead. |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |
class | string | '' |