Filter
A faceted filter component for selecting and displaying multiple filter options.
Anatomy
Usage
With Data Filters
With Color Indicators
With Custom Icons
FilterData.sComposed Props
| Prop | Type | Default |
|---|---|---|
filters | DataFilter<Datum>[] | — |
table | Table<Datum> | — |
compressed | boolean | — |
filterState* | FilterState | — |
setFilterState* | Dispatch<FilterAction> | — |
Filter.FacetedComposed Props
| Prop | Type | Default |
|---|---|---|
label | string | — |
icon | true | LucideIcon | — |
value* | string[] | — |
onValueChange | function | — |
options* | T[] | — |
buttonProps | any | "{}" |
asBadge | boolean | — |
Filter.FacetedRoot Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
open | boolean | — |
defaultOpen | boolean | — |
onOpenChange | function | — |
modal | boolean | — |
FilterData. Props
| Prop | Type | Default |
|---|---|---|
filter* | DataFilter<Datum> | — |
compressed | boolean | — |
index* | number | — |
state | string | boolean | string[] | — |
setState* | function | — |
setFilterState* | Dispatch<FilterAction> | — |
table | Table<Datum> | — |
Filter Props
| Prop | Type | Default |
|---|---|---|
filter* | DataFilter<Datum> | — |
compressed | boolean | — |
index* | number | — |
state | string | boolean | string[] | — |
setState* | function | — |
setFilterState* | Dispatch<FilterAction> | — |
table | Table<Datum> | — |
Filter.FacetedButton Props
| Prop | Type | Default |
|---|
Filter.FacetedOption Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
className | string | — |
asChild | boolean | — |
disabled | boolean | — |
onSelect | function | — |
value | string | — |
keywords | string[] | — |
forceMount | boolean | — |
count | number | — |
checked | boolean | — |
Filter.FacetedOptions Props
| Prop | Type | Default |
|---|---|---|
panelProps | any | — |
arrow | boolean | — |
forceMount | true | — |
className | string | — |
children | ReactNode | — |
asChild | boolean | — |
side | enum | — |
sideOffset | number | "4" |
align | enum | — |
alignOffset | number | — |
arrowPadding | number | — |
avoidCollisions | boolean | — |
collisionBoundary | Element | Element[] | — |
collisionPadding | see more | — |
sticky | enum | — |
hideWhenDetached | boolean | — |
updatePositionStrategy | enum | — |
onEscapeKeyDown | function | — |
onPointerDownOutside | function | — |
onFocusOutside | function | — |
onInteractOutside | function | — |
onOpenAutoFocus | function | — |
onCloseAutoFocus | function | — |
placeholder | string | — |
onValueChange | function | — |
value | string[] | — |
Filter.FacetedTrigger Props
| Prop | Type | Default |
|---|---|---|
type | enum | — |
className | string | — |
children | ReactNode | — |
asChild | boolean | — |
Filter.FacetedVirtualized Props
| Prop | Type | Default |
|---|---|---|
className | string | — |
label | string | — |
icon | true | LucideIcon | — |
value* | string[] | — |
onValueChange | function | — |
itemSearchTerm | function | "(item) => item.value" |
estimateSize | function | "() => 32" |
options* | T[] | — |
buttonProps | any | "{}" |
asBadge | boolean | — |
Filter.s Props
| Prop | Type | Default |
|---|---|---|
filters | DataFilter<Datum>[] | — |
table | Table<Datum> | — |
compressed | boolean | — |
filterState* | FilterState | — |
setFilterState* | Dispatch<FilterAction> | — |