FilterChips
Active-filter summary with removable chips and a clear-all action.
Design intent
Filter bars collapse, scroll or hide on mobile, so users lose track of what is applied. FilterChips keeps the active set visible, with one remove action per filter and an optional reset.
npx @slipstream-ui/cli@latest add filter-chipsProps
| Prop | Type | Default | Description |
|---|---|---|---|
| filters | FilterChip[] | required | Active filters: key, label, optional value and onRemove. |
| size | 'sm' | 'md' | 'lg' | 'md' | Chip scale: padding, text size and remove-button icon size. |
| onClearAll | () => void | — | Shows a clear-all action when provided. |
| clearLabel | string | 'Clear all' | Label for the clear-all action. |
| emptyLabel | string | — | Shown when there are no active filters. Nothing renders when omitted. |
| 'aria-label' | string | 'Active filters' | Accessible name for the filter group. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't duplicate the filter controls
FilterChips summarizes applied filters; the select, slider or segmented control still owns input.
tsx// Avoid<FilterChips filters={filters} onClearAll={clearAll} /><Select options={filters.map(...)} />
Accessibility
- Renders a named group (Active filters by default) so the summary has a landmark-like label.
- Each remove control is named Remove <filter>: <value>.
Content guidelines
Filter labels
- Use the same labels as the controls
- Show the selected value, not the option list
- Use Any only when a filter is explicitly unbounded
Good examples
- Industry: Technology
Bad examples
- Filter 1: tech, software, SaaS
Composition
Compose with FilterBar: Place FilterChips directly under FilterBar so applied filters remain visible
<FilterBar /><FilterChips filters={filters} onClearAll={clearAll} />
Compose with SegmentedControl: Use FilterChips to summarize multi-select segments
<SegmentedControl multiple /><FilterChips filters={chips} />
Related components: FilterBar, SegmentedControl, RangeSlider
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.