Patterns · Data
FilterBar
Since v0.0.1
Search + filter toolbar pattern for data-heavy list or table views.
import { FilterBar } from '@nexub/patterns';Examples
Default
Without search
`search={false}`.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| search | boolean | true | 11.3: false leaves the search field out, for a bar of filters and actions only. |
| searchPlaceholder | string | — | Placeholder text for the search input. |
| searchValue | string | — | Controlled search value. |
| onSearch | ((value: string) => void) | — | Callback when search value changes. |
| searchLabel | string | — | Accessible name of the search field (5.1). Defaults to the localised search message. |
| filters | React.ReactNode | — | Filter controls rendered to the right of search. |
| activeCount | number | 0 | Applied filters; above 0 shows "N filters" (5.5). countFilters(group) counts a FilterBuilder query. |
| onClearAll | (() => void) | — | Shows a Clear all button next to the count (5.5). |
| actions | React.ReactNode | — | Action buttons (e.g. "Export") rendered on the far right. |
On iOS & Android
Web only
FilterBar has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.