Kaupvik KeelKaupvik Keel
Open Source · v0.7.8

Filter builder

Build bounded AND/OR expressions from a host-provided field schema.

Interactive example

Loading Polaris web components…

Usage

<FilterBuilder groups={groups} fields={fields} onChange={setGroups} />

Properties

PropertyTypeDefaultDescription
expressionFilterExpression—Nested group/rule AST; all, any, none, exactly one.
onExpressionChange(expression)=>void—Controlled AST callback.
groupsFilterGroup[]RequiredOR groups containing AND rules.
fieldsFilterField[]RequiredAllowed fields, operators, optional choices and placeholders.
onChange(groups)=>voidRequiredControlled expression update.

Design & interaction

Use expression for nested AND/OR/NOT/exactly-one logic. groups/onChange remain v1-compatible. Field suggestions allow free manual entry and never replace other rules. Hosts validate depth, allowlists, query semantics and scan budgets on the server. Real box cells and container queries keep long IDs inside narrow drawers. Values stack below field/operator at narrow widths.

Accessibility

Native labeled fields and selects; accessible value-picker buttons and popover; keyboard-usable nested groups.

Open-source source

Available in github.com/Kaupvik/kaupvik-polaris ↗. Host apps supply authentication, native persistence, and read-back state.