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

Filter Builder

Filter builder: nested AND/OR groups, field-aware conditions, JSON and a summary. Pro · Forms and input › Whole forms and filters

Visual builder for nested AND / OR filters with field-type-aware conditions. Pair it with matchesFilter / filterRows to apply the value and describeFilter to summarise it.

Installation

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

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

Props

PropTypeDefault
fields *readonly FilterField<T>[]Filterable fields; the type picks the operators and the value editor.
valueFilterGroupThe filter tree (JSON-serialisable). The root is always a group.
defaultValueFilterGroupEMPTY_ROOTInitial value when uncontrolled.
onValueChange(value: FilterGroup) => voidCalled with the new value when it changes.
maxDepthnumber2Levels of groups, the root included: 1 allows no nested groups. Default 2.
footerReactNodeContent after the add buttons, e.g. a "Clear" or "Apply" button.
localestringNumber and date formatting in the value editors. Defaults to the ThemeProvider locale.
labelsPartial<Omit<FilterBuilderLabels, 'operators'>> & { operators?: Partial<FilterOperatorLabels> }Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Form Autosave Status · Next: Filter Toolbar · All Forms and input