A filter panel for narrowing down content. Available as a Button or Icon trigger, opens on click to show filter options. Supports RTL.
Loading demo: filtration-real-world
npx sdaia-ui@latest add filtration
import { Filtration } from '@/components/ui/Filtration';<Filtration type="button" />Filter panel triggered by a button. Click to open and apply filters.
Loading demo: filtration-button
Filter panel triggered by an icon button.
Loading demo: filtration-icon
Props for the Filtration component.
Prop | Type | Default | Required |
|---|---|---|---|
triggerType | 'button' | 'icon' | 'button' | optional |
triggerLabel | string | 'Filter' | optional |
activeFilters | FiltrationActiveFilter[] | [] | optional |
onRemoveFilter | (id: string) => void | - | optional |
sections | FiltrationSectionConfig[] | [] | optional |
applyLabel | string | 'Apply Filters' | optional |
clearLabel | string | 'Clear' | optional |
activeFilterCount | number | - | optional |
onApply | () => void | - | optional |
onClear | () => void | - | optional |
showActions | boolean | true | optional |
open | boolean | - | optional |
defaultOpen | boolean | false | optional |
onOpenChange | (open: boolean) => void | - | optional |
rtl | boolean | false | optional |
className | string | - | optional |
children | ReactNode | - | optional |
labels | Partial<FiltrationLabels> | English strings | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Chips and the filter button sit in a row. The filter panel is 350px wide and opens below the button. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | The chip row wraps. The panel stays inside the screen, narrows to the screen width minus 16px, and its list scrolls inside the space left below the button. |