Components
Filter bar
Wrapping row for a search field that fills the free width and the filter controls beside it.
import { FilterBar, Input } from "@openperf/deft";
import { IconSearch } from "@tabler/icons-react";
<FilterBar.Root>
<FilterBar.Controls>
<Input.Root
aria-label="Search traces"
icon={IconSearch}
onChange={(event) => setQuery(event.target.value)}
placeholder="Search traces"
type="search"
value={query}
/>
</FilterBar.Controls>
</FilterBar.Root>;When to use
| Need | Component |
|---|---|
| Search field and filters above a table | Filter bar |
| Bulk actions on the selected rows | Action bar |
| Row of related buttons that act on the view | Toolbar |
Layout
The filter bar only lays out its children: it holds no state and filters nothing, so keep the query in your own state.
| Element | Width |
|---|---|
FilterBar.Controls | Free width of the root, at least 240px |
| Input directly inside it | Fills the controls, at least 240px |
| Other children of the controls | Their own width, next to the input |
| Siblings of the controls in the root | Share the row and wrap below when out of room |
API
FilterBar.Root and FilterBar.Controls declare no props of their own.