Filter Builder
Build one filter condition from a field, operator, and typed value in a joined control.
Interactive example
Each field declares its available operators and whether its value is selected, numeric, or text. Fields, operators, and options take an optional iconStart: an icon name, an icon descriptor, or a node.
{
"fieldId": "answer-engine",
"operatorId": "is",
"value": "chatgpt"
}Value types
selectopens a selection menu. Setsearchablewhen the option set benefits from filtering.numberrenders an inline number input styled as the final button segment, commits on blur or Enter, and validatesmin,max, andstep. Step alignment starts atminwhen provided and zero otherwise.textrenders an inline text input styled as the final button segment. Empty strings clear the value unlessallowEmptyis enabled.multistores a string array and shows each value as a removable pill. Supplyoptionsfor a checkable list, orallowCustomwithout options for a text input that adds a value on Enter or comma. SetonSearchChangeto run the search yourself, for example against an API.
Compatible field changes
Changing the field preserves an operator when the new field contains the same operator ID. Otherwise, it uses defaultOperatorId or clears the operator.
Values reset by default. To preserve a value across related fields, give both value definitions the same compatibilityKey. The value is retained only when it is also valid for the new definition. For example, Assignee and Reviewer can share a user compatibility key.
Controlled state
FilterBuilder owns only which menu is open. The consumer owns the complete condition and updates it through onConditionChange.
Properties
Field definitions with their operators, icons, defaults, and value editor configuration.
Controlled fieldId, operatorId, and value. The value is a string, number, string array, or null.
Called with the complete next condition after any segment changes.
Label shown before a field is selected.
Default: Select field
Label shown before an operator is selected.
Default: Select operator
Fallback label shown before a value is configured or selected.
Default: Select value
Shows a search input in the field menu.
Default: false
Placeholder for the optional field search input.
Default: Search fields
Shared size for the three joined segments.
Default: regular
Disables every segment in the condition.
Default: false
Controls portal rendering for the field, operator, and value menus.
Default: true
Aligns selection menus to their trigger segment.
Default: start
Accessible label for the grouped filter condition.
Default: Filter condition
Additional classes for the joined control wrapper.
Additional classes for each segment.