Skip to main content
Version: 57.2.0

Filter

A compositional filter dropdown for data-heavy views. Combine the select menu, boolean, and accordion sub-components inside the parent, with an optional Apply/Clear/Cancel footer. Desktop web only.

Package: @terreno/ui
Categories: Component
Props interface: FilterProps
Story source: demo/stories/Filter.stories.tsx

Live demo

Props

PropTypeRequiredDescription
childrenReactNodeYesComposed filter controls rendered inside the dropdown panel.
applyButtonTextstring
cancelButtonTextstring
clearButtonTextstring
defaultOpenbooleanInitial open state when uncontrolled.
iconNameIconNameTrigger button icon. Defaults to the built-in
isOpenbooleanControlled open state. Omit to use
labelstringTrigger button label.
onApplyreflectionCalled when Apply is pressed. The dropdown then closes.
onCancelreflectionCalled when Cancel or a click-outside closes the dropdown.
onClearreflectionCalled when Clear is pressed. The dropdown then closes.
onOpenChangereflectionCalled whenever the dropdown opens or closes.
showActionButtonsbooleanMaster toggle for the Apply/Clear/Cancel footer.
showApplyButtonbooleanShow the Apply button in the footer.
showCancelButtonbooleanShow the Cancel button in the footer.
showClearButtonbooleanShow the Clear hyperlink in the footer.
testIDstringRoot test id for the primary interactive element or container.
variantunionPrimary theming for the trigger and Apply button.
widthnumberPanel width in pixels. Defaults to 320 per the design spec.