ValyroUI Русская версия

Filter Toolbar

Catalog filter bar: result count, dropdown filters, sorting, chips. Pro · Forms and input › Whole forms and filters

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add filter-toolbar
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { FilterToolbar } from 'valyro-ui-pro';

Props

PropTypeDefault
titleReactNodeWhat is being filtered: "Shoes".
countnumberNumber of results, shown muted after the title.
filters *FilterToolbarFilter[]Dropdown filters, each a list of checkboxes.
valueFilterToolbarValueSelected values per filter (controlled).
defaultValueFilterToolbarValueInitial value when uncontrolled.
onValueChange(value: FilterToolbarValue) => voidCalled with the new value when it changes.
sortOptionsSelectItem[]Sort choices; the sort select is shown when given.
sortstringSelected sort (controlled).
defaultSortstringInitial sort when uncontrolled.
onSortChange(sort: string) => voidCalled with the new sort when it changes.
headingLevel1 | 2 | 3 | 4 | 5 | 62Level of the title (default 2).
localestringBCP 47 locale for the result count.
labelsPartial<FilterToolbarLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Filter Builder · Next: Data Table · All Forms and input