Facets
v0.64.0, changelogThe facet column beside a catalog or table: checkbox groups with counts and "Show all N", pinned under the shell's bar; FacetsDrawer opens the same list in a bottom sheet on phones.
API reference
Generated from the types. Every part also takes className.
FacetList
- facetsrequired
Facet[]The facets, in the order to show them, each option with its count.- value
Record<string, string[]>The picks, when you hold them (the URL, a query): pass the same value toFacetsandFacetsDrawer.- defaultValue
Record<string, string[]>The picks it starts with, when it holds them itself.- onValueChange
(value: FacetValue) => voidCalled with the whole value after each pick: every facet's picks by its key.- max
numberShow this many options per facet, then "Show all N". All of them when left out.- locale
stringFormats the counts (a BCP 47 tag such as "zh-TW"): "48,210". Left out, English (formatCount), so the server and the browser agree.- labels
Partial<FacetsLabels>The words it says, to translate them (facetsLabelsin labels-zh-tw).
Facets
- facetsrequired
Facet[]The facets, in the order to show them, each option with its count.- value
Record<string, string[]>The picks, when you hold them (the URL, a query): pass the same value toFacetsandFacetsDrawer.- defaultValue
Record<string, string[]>The picks it starts with, when it holds them itself.- onValueChange
(value: FacetValue) => voidCalled with the whole value after each pick: every facet's picks by its key.- max
numberShow this many options per facet, then "Show all N". All of them when left out.- locale
stringFormats the counts (a BCP 47 tag such as "zh-TW"): "48,210". Left out, English (formatCount), so the server and the browser agree.- labels
Partial<FacetsLabels>The words it says, to translate them (facetsLabelsin labels-zh-tw).
FacetsDrawer
- facetsrequired
Facet[]The facets, in the order to show them, each option with its count.- value
Record<string, string[]>The picks, when you hold them (the URL, a query): pass the same value toFacetsandFacetsDrawer.- defaultValue
Record<string, string[]>The picks it starts with, when it holds them itself.- onValueChange
(value: FacetValue) => voidCalled with the whole value after each pick: every facet's picks by its key.- max
numberShow this many options per facet, then "Show all N". All of them when left out.- locale
stringFormats the counts (a BCP 47 tag such as "zh-TW"): "48,210". Left out, English (formatCount), so the server and the browser agree.- labels
Partial<FacetsLabels>The words it says, to translate them (facetsLabelsin labels-zh-tw).- defaultOpen
booleanStarts with the sheet open.- open
booleanWhether the sheet is open, when you hold it.- onOpenChange
(open: boolean) => void- onOpenAutoFocus
(event: Event) => voidThe sheet's own focus move when it opens (RadixonOpenAutoFocus). Callevent.preventDefault()to keep focus where it is, for a sheet that opens on load (a preview) rather than from its button.