Skip to content
Design System
GitHub

The 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 to Facets and FacetsDrawer.
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 (facetsLabels in 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 to Facets and FacetsDrawer.
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 (facetsLabels in 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 to Facets and FacetsDrawer.
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 (facetsLabels in 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 (Radix onOpenAutoFocus). Call event.preventDefault() to keep focus where it is, for a sheet that opens on load (a preview) rather than from its button.