Solid query builder
MIT · SolidJS · fine-grained · TypeScript
@qnot/solid, default builder, live on this page. Edit a rule and watch the exports.
pnpm add @qnot/core @qnot/solidA Solid query builder in two files.
For more control, create the store with useQueryStore, share it with <QueryProvider>, and read it with useQuery, useHistory or useIsValid. Each primitive subscribes to one node of the store, which suits Solid's fine-grained updates.
The default builder takes components, labels and class. See the Solid guide.
What you get.
- Typed schemadefineFields · QueryOf
Declare fields once. Rule values narrow by field and operator, and validated queries come back typed.
- Export anywhereSQL · Mongo · JsonLogic
Parameterized SQL in five dialects, MongoDB, JsonLogic, Elasticsearch, SpEL and plain English.
- Validationissues
Per-rule issues from the schema: required, min/max, patterns, options and your own checks.
- Undo and redohistory
Every edit is a step, typing merges into one. The demo above has the buttons wired up.
- Drag and dropdnd
Move rules and groups anywhere. The Solid binding ships the drag handle and drop target helpers.
- Any languagelabels · messages
Every UI string and validation message is an override away. No i18n library required.
- Same query on the servervalidate · compile
Share fields.ts with your API. Validate the query, then run it as bound SQL or filter rows in memory.
- Fast at 1,000 rulesper-node subscriptions
Editing one rule updates one rule. A keystroke costs the same at ten rules or a thousand.
How it compares.
- qnot vs react-querybuilderrender 117 vs 482 ms
The most used React query builder. Huge ecosystem, React Native, many export formats.
- qnot vs jQuery QueryBuilderrender 117 vs 868 ms
The classic jQuery plugin with Bootstrap styling and SQL/Mongo plugins.
- qnot vs Syncfusion QueryBuilderrender 117 vs 6,491 ms
A commercial component in the Syncfusion suite, with wrappers for most frameworks.
Questions people ask
- Is it free?
- Yes. @qnot/solid and @qnot/core are MIT licensed. No license key, no paid tier.
- Does it work with SolidStart?
- Yes. The package ships source through the solid export condition, which vite-plugin-solid (and so SolidStart) compiles for the client and the server. The default builder renders with Solid's renderToString (we checked it), and server functions can import the same fields.ts to validate the query and turn it into SQL.Server usage
- Is it fine-grained?
- Yes. useRule(id) returns separate accessors for the rule, its field, operator, value, issues and permissions, so an editor that reads only value() re-runs only when the value changes.
- Can I use it next to React in one Vite app?
- Yes, with the usual care: limit each JSX plugin to its own files with include / exclude. The qnot store is plain TypeScript and can be shared between the two.Solid guide
- Can I write my own components?
- Yes. Pass components to replace single pieces of the default builder, or build your own from useGroup, useRule, useNode and the drag primitives (useDragHandle, useDropTarget, useGroupDropZone).
- Which export formats are there?
- SQL in five dialects with bound parameters, MongoDB, JsonLogic, Elasticsearch, SpEL and plain English, plus two-way JSON for react-querybuilder, react-awesome-query-builder and jQuery QueryBuilder. Each codec is its own import, so you bundle only what you use.Formats