Chip content
A value on its own, a field and its value, and an optional icon.
value
field and value
with icon
truncated
The removable chips that show what a list has been narrowed to, with the count that is left and a way to clear them all.
Remove a filter and the count widens with it. Tab into the row, then use the arrow keys and Backspace.
<WildFilterChips
:chips="activeFilters"
label="Filters"
:count="countLabel"
empty-text="No filters applied"
@remove="removeFilter"
@clear="clearFilters"
/>A label, the chips, Clear all and the count, on one line that wraps. Only the chips wrap; the label and count hold the ends.
A value on its own, a field and its value, and an optional icon.
28 under a table, 32 in a toolbar, 36 beside a large search field.
The chip isn’t a button. Its states belong to the ×, and the chip answers them.
Add filters from the button, remove them from the chips, and watch the rows change.
The row is one tab stop. A screen reader hears which filter went, and the new count.
| Key | What it does |
|---|---|
| Tab | Moves into the row, onto the chip focused last, then out. |
| → / ← | Moves between chips and Clear all, wrapping at the ends. |
| Home / End | Moves to the first or last item. |
| Backspace / Delete | Removes the focused chip. |
| Enter / Space | Removes the focused chip, or clears all from Clear all. |
| Prop | Type | Default | Description |
|---|---|---|---|
| chips | { id, label, field?, icon? }[] | — | The filters, in the order they were added. |
| size | 'sm' | 'md' | 'lg' | 'sm' | 28, 32 or 36px tall. |
| label | string | — | A leading label, which also names the row. |
| count | string | — | The result count, announced when it changes. |
| clear-label | string | 'Clear all' | Shown from two chips up. |
| empty-text | string | — | Shown when there are no chips. |
| aria-label | string | 'Active filters' | The row’s name with no visible label. |
| disabled | boolean | false | Locks the chips and Clear all. |
| @remove | (id: string) => void | — | A chip’s ×, Backspace or Delete. |
| @clear | () => void | — | Clear all. |
| Token | Value | Where it lands |
|---|---|---|
| --global-blue-100 | #EBFAFF | Chip ground. |
| --global-blue-200 | #D6F4FF | The × circle on hover. |
| --global-blue-300 | #BDEDFF | Chip edge; the × circle pressed. |
| --global-blue-400 | #A3E7FF | Chip edge while the × is hovered. |
| --global-blue-1100 | #0C296A | Chip text; the × on hover. |
| --global-blue-1000 | #1877F2 | The × at rest; Clear all; focus. |
| --global-neutral-grey-1000 | #4F4D55 | Count and empty text. |
| (no token) | 24px | Chip radius. |