Give the root its fields. Put the add button in a row, and the chips under it.
invoice-filters.tsx
Filters
| Prop | Type | Default | Description |
|---|---|---|---|
| fields | — | The fields people can filter by, in menu order. | |
| value | FilterValue | — | The filters, in chip order (controlled). One entry per field. |
| default | FilterValue | NO_FILTERS | The first filters (uncontrolled). |
| on | — | Called on each change: live, as people pick and type. A draft entry filters nothing. | |
| labels | — | Words over FILTERS_LABELS. Keep the object stable (a module constant or a memo). | |
| locale | string | — | The locale of numbers and days. Default: the page locale. |
| disabled | boolean | false | |
| now | DisplayNow | — | The clock of the date presets and texts. Default: the time the bar mounts. |
| preview | — | The row count of a value, for "Show 42 results" in the phone sheet. | |
| children | ReactNode | — | FiltersAdd, FiltersBar, and the rest of the layout. |
FiltersBar
FiltersChip
FiltersAdd
<button>| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "button""icon" | "button" | button (default): the outline "Filter" button with the F key, for a toolbar row. icon: the dashed + at the end of the chips (the default in FiltersBar). |
| hotkey | boolean | — | Open the field list with the F key (not in a text field). Default true for button. |
| class | string | — | |
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. |
FiltersClear
<button>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||
| unstyled | boolean | — | Drop the Button look and keep only className. Use it when render mounts a component with its own look (a Toggle, a ToggleGroupItem, a SelectTrigger), or the two looks mix. | |||||||||||
| chevron | boolean | — | Add a chevron after the content, for a button that opens a menu, a select, or a popover with its current value in front ("Heading 1", a list icon, the color "A"). See the JSDoc of ToolbarButton. Default false. | |||||||||||
| rounded | "default""full" | — | ||||||||||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | ||||||||||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | ||||||||||||
| children | ReactNode | — | ||||||||||||
From Base UIToolbar.ButtonBase UI docs | ||||||||||||||
| disabled | boolean | false | When true the item is disabled. | |||||||||||
| focusable | boolean | true | When true the item remains focusable when disabled. | |||||||||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | ||||||||||||
| ||||||||||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | |||||||||||
FilterOptionsItems
| Prop | Type | Default | Description |
|---|---|---|---|
| field | — | ||
| entry | FilterEntry | — | The entry, or undefined before the field has one (the add menu). |
| on | — | ||
FilterOptionsChecklist
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| field | — | ||
| entry | FilterEntry | — | The entry, or undefined before the field has one (the add menu). |
| on | — | ||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
FilterOptionsTree
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| field | — | ||
| entry | FilterEntry | — | The entry, or undefined before the field has one (the add menu). |
| on | — | ||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
FilterValueEditor
| Prop | Type | Default | Description |
|---|---|---|---|
| field | — | ||
| entry | FilterEntry | — | The entry, or undefined before the field has one (the add menu). |
| on | — | ||
| months | 12 | 2 | The calendar months side by side: 2 in a popup, 1 in the phone sheet. |
| on | — | Enter in a text or number field: the popup closes. | |
| F | Opens the field list, when FiltersAdd has the hotkey. |
|---|---|
| EnterorSpace | Opens the editor of a chip part, or picks a value. |
| Arrow keys | Move between the rows of an editor. |
| Escape | Closes the editor. |
Built with
Installs with Filters
- Components
- Button,Button Group,Calendar,Cascader,Checkbox,Checkbox Group,Date Field,Date Input+ 17 more







