Typed end to end
defineFields · QueryOf · RowOfDeclare fields once. Every rule's value narrows by field and operator, so 'gold' on an enum of 'free' | 'pro' is a type error, and validated queries come back strict.
qnot is typed from your schema to the SQL it writes, runs in React, Vue, Svelte, Solid or plain JS, and wears any UI kit. Editing one rule re-renders one rule. About 15 KB.
MIT · TypeScript · server and browser
Declare fields once. Every rule's value narrows by field and operator, so 'gold' on an enum of 'free' | 'pro' is a type error, and validated queries come back strict.
The store keeps every node by id and tells only the node that changed. A keystroke costs the same at ten rules or a thousand: half a millisecond.
Read howExport to SQL with parameters in five dialects, MongoDB, JsonLogic, Elasticsearch and SpEL, and read react-querybuilder, RAQB and jQuery QueryBuilder JSON both ways.
Read howThe core is plain TypeScript. Each binding is hooks over the same store, plus a small unstyled builder you can swap out piece by piece.
Read howShare one fields.ts. The browser builds the query; the server validates it, narrows its type, and turns it into SQL with bound parameters, or filters rows in memory.
Read howGive the store a format and value / onChange speak react-querybuilder's or RAQB's JSON. Keep your stored queries; swap the library underneath.
Read howRun of 2026-10-19: headless Chromium, production builds, no CPU throttling; medians of 5 to 9 fresh pages, 10 fields, 100 groups of 10 rules. JS is gzipped and excludes React (jQuery is included), and each bundle includes the library's own SQL/JSON export. With 4× CPU throttling the gaps widen.
Every edit is a step; typing in one value merges into one. Batches are one step.
Move rules and groups anywhere, with headless drag handles and drop targets in every binding.
Per-node issues from the schema: required, min/max, patterns, options, your own checks. Messages are yours to translate.
Compile a query once into a predicate and filter rows in the browser or on the server.
"At least 3 orders where status is paid", and address.city as a field of its own.
Functions on either side of a rule, nestable, with output for each format.
An ordered list of conditions with results: routing forms, pricing tiers, CASE WHEN.
Lock nodes, go read-only, cap rules and depth. The UI disables what the store would refuse.
pnpm add @qnot/core @qnot/reactThe core and the binding for your framework. React shown; Vue, Svelte, Solid and DOM have their own.
defineFields with f.text(), f.number(), f.enum()… Types flow from here.
Drop in the unstyled builder, or build your own from the hooks with the UI kit you already use.