AIMCP Server and Agent Skills included

React Query Builder for filters, now easier to build with AI

Let users build filters with rules and nested AND or OR groups, then export them to SQL, MongoDB, or DataManager predicates, with drag and drop, cloning, locking, and templates. AI assistants set it up for you from the current docs.

  • 1.8M+npm downloads
  • 4.5/5850+ G2 reviews
  • 4.6/5950+ Capterra reviews
  • WCAG 2.2and Section 508
  • SQL andMongoDB import and export

Trusted by the world’s leading companies

Syncfusion customers include Visa, Apple, McDonald’s, Netflix, Starbucks, IBM, Tesla, and Schneider Electric

Now easier with AI

Build and use query builders faster with AI

Coding assistants write the setup from the current docs, and your users can describe a filter in plain language.

01For developers

Describe a filter and get code that uses the documented API

The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current Query Builder docs and recommended patterns.

See all 29 features

AI coding assistantMCP · Syncfusion React

Filter customers by country and order count.

search_docs“React Query Builder columns and rules” · 2 doc sections

+<QueryBuilderComponent dataSource={customers}

+ rule={initialRule} columns={[

+{ field: 'Country', label: 'Country',

+ type: 'string' },

+{ field: 'Orders', label: 'Orders',

+ type: 'number' }]} />

Documented API: columns, rule, dataSource

ResultRendered in your app

AI coding assistantMCP · Syncfusion React

Show the SQL for the current rules and reload a saved query.

search_docs“React Query Builder sql and mongodb” · 2 doc sections

+const sql =

+ qb.current?.getSqlFromRules(qb.current.getRules());

+const mongo = qb.current?.getMongoQuery();

+qb.current?.setRulesFromSql("Country = 'France' AND Orders > 10");

Documented API: getSqlFromRules, getMongoQuery, setRulesFromSql

ResultRendered in your app

AI coding assistantMCP · Syncfusion React

Filter the customers grid whenever the rules change.

search_docs“React Query Builder filter a data grid” · 2 doc sections

+ruleChange={() => {

+ const q = qb.current;

+ if (!grid.current || !q) return;

+grid.current.query = new

+ Query().where(q.getPredicate(q.getValidRules()));

}}

Documented API: ruleChange, getPredicate, getValidRules

ResultRendered in your app

AI coding assistantMCP · Syncfusion React

Let users drag rules between groups.

search_docs“React Query Builder drag and drop” · 2 doc sections

+<QueryBuilderComponent columns={columns}

+ allowDragAndDrop={true} />

Documented API: allowDragAndDrop

ResultRendered in your app

AI coding assistantMCP · Syncfusion React

Lock the region rule so users cannot edit it.

search_docs“React Query Builder lock rules and groups” · 2 doc sections

+qb.current?.lockRule('querybuilder_group0_rule1');

Documented API: lockRule

ResultRendered in your app

AI coding assistantMCP · Syncfusion React

Use a slider to pick the order count in rules.

search_docs“React Query Builder rule and value templates” · 2 doc sections

+{ field: 'Orders', label: 'Orders', type: 'number',

+ template: { create, write, destroy } }

+// write: new Slider({ min: 0, max: 50, change:

+// (e) => qb.current?.notifyChange(e.value, args.elements) })

Documented API: columns.template, notifyChange

ResultRendered in your app

AI coding assistantMCP · Syncfusion React

Filter by the city inside each customer address.

search_docs“React Query Builder complex data” · 2 doc sections

+<QueryBuilderComponent dataSource={customers}

+ separator="."

+columns={[{ field: 'Address.City', label: 'City', type: 'string' }]} />

Documented API: separator, columns

ResultRendered in your app

AI coding assistantMCP · Syncfusion React

Allow AND or OR between each pair of rules and require a value.

search_docs“React Query Builder separate connectors and validation” · 2 doc sections

+<QueryBuilderComponent columns={columns}

+ enableSeparateConnector={true}

+ allowValidation={true} />

Documented API: enableSeparateConnector, allowValidation

ResultRendered in your app

02For your users

Filters your users can describe in plain language

Users type a request, and an AI service you connect builds the rules and the matching query.

Natural language query

AI turns a plain language request into Query Builder rules and filters the grid.

Accessibility

Accessible to keyboard and screen reader users

The React Query Builder component follows WAI-ARIA practices, with keyboard access and screen reader support.

Standards
WCAG 2.2 and Section 508
Keyboard
Arrow keys, Enter, Esc, Delete, Tab
Screen readers
aria-expanded and aria-haspopup
Layout
Right-to-left and mobile support
Read the accessibility docs

Features in depth

React Query Builder features in depth

Open a demo to try each one, or the docs to see the API.

Rules and nested groups with AND, OR, and NOT

Users add and delete conditions and groups, combine them with AND or OR, and negate a group with NOT when enableNotCondition is set. The maxGroupCount property limits how deep groups nest.

Columns: labels, operators, formats, and validation

Columns define each field’s label, type, operators, step, and format, and sortDirection sorts the field list in ascending or descending order. With allowValidation, validateFields flags empty or out-of-range values with your messages.

Data binding: local, remote, and complex data

Bind JSON, OData, or Web API data through a DataManager, and create sub-fields from nested columns or a complex data source with a separator.

Import and export: JSON, SQL, and MongoDB

Load rules from JSON, inline or parameterized SQL, or MongoDB queries, and export them to the same formats with methods such as getSqlFromRules and getMongoQuery.

Filter a Data Grid or any DataManager query

The getPredicate method turns valid rules into a predicate for DataManager queries, so the Data Grid or any data source shows only matching records.

Drag, clone, and lock rules and groups

Drag rules and groups to a new position, clone them next to the original, and lock them so their field, operator, and value cannot change.

Templates for headers, rules, and values

Header templates customize connectors and add buttons, rule templates replace the whole rule row, and column templates swap the value editor for sliders, checkboxes, or dropdowns.

Separate connectors, summary view, and layouts

Separate connectors mix AND and OR within one group. The summary view shows the filter as readable text, and displayMode lays the builder out horizontally or vertically.

Model binding for field, operator, and value editors

The fieldModel, operatorModel, and valueModel properties pass settings to the dropdown and input components that edit each part of a rule.

Accessible, localized, and themed

Keyboard interaction, screen reader support, WCAG 2.2, localization, and right-to-left layouts, in Tailwind 3.4, Bootstrap 5.3, Material 3, Fluent 2, and High Contrast themes, with light and dark modes, you can brand in Theme Studio.

Get started

Get your first query builder running, with or without AI

With an AI coding assistant

  1. Connect the Syncfusion MCP serverWorks in VS Code, Cursor, JetBrains, and other MCP-compatible assistants.Set up the MCP server
  2. Add Agent Skills to your projectYour agent follows Syncfusion’s recommended Query Builder patterns.Install Agent Skills
  3. Describe the query builderCopy this prompt to start.

    Add a Syncfusion React Query Builder above my customers grid with rules for country, orders, and status, filter the grid when the rules change, and show the SQL.

By hand, in three steps

1 · Install

npm install @syncfusion/ej2-react-querybuilder @syncfusion/ej2-tailwind3-theme --save

2 · src/App.css

@import '../node_modules/@syncfusion/ej2-tailwind3-theme/styles/query-builder/index.css';

3 · src/App.tsx

import { QueryBuilderComponent } from '@syncfusion/ej2-react-querybuilder';
import './App.css';

const customers = [
  { CustomerID: 1001, Country: 'USA', Orders: 24 },
  { CustomerID: 1002, Country: 'France', Orders: 8 }
];

export default function App() {
  return (
    <QueryBuilderComponent dataSource={customers} columns={[{ field: 'Country', label: 'Country', type: 'string' }, { field: 'Orders', label: 'Orders', type: 'number' }]} />
  );
}
Read the getting started guide

Works withReact 15.5.4 or laterTypeScript and JavaScriptNext.jsRemixGatsbyVitePreactSystem requirements

Customer reviews

Trusted by developers and teams

G2

4.5/5

From 850+ reviews of Essential Studio®

Read the reviews on G2

“Awesome, enough said”

Easy usability, solving real-life problems, easy to implement. Most of the cases have the operators and settings possibilities you need right away.

Oliver O.Creative and Art Direction, Small Business

“A giant framework with great pricing options”

I have loved the components and options that Syncfusion has; besides, its documentation, demos, and support are excellent.

Alejandro Javier V.CEO, Small Business
75%
lower costs
50%
faster development

Customer story · Igniatek

Igniatek cuts development time 50% and costs 75% with Essential Studio®

“I would definitely recommend Syncfusion for anyone who is trying to develop something meaningful.”

Somnath Maji, Founder, Igniatek Consultancy

Award-winning

Including the 2026 Devies Award, Capterra Shortlist 2026, Software Advice FrontRunners 2026, and G2 Best Software 2025.

Recent industry awards won by Syncfusion

Complete feature list

Every query builder feature, included in the license

  • Every feature includedNo separate enterprise edition
  • Royalty-freeNo runtime or deployment fees
  • Weekly patchesPlus regular feature releases
  • Expert supportFrom Syncfusion engineers

Related data components:React Data GridReact Pivot TableReact Tree Grid

Questions and answers

React Query Builder FAQ

What is the React Query Builder?

The Syncfusion React Query Builder lets users build filter queries visually, with rules and nested groups. You can turn the result into SQL, MongoDB queries, or Data Grid filters. Explore the demos

How do I add a query builder in React?

Install @syncfusion/ej2-react-querybuilder and the Tailwind 3 theme, then render QueryBuilderComponent with columns that describe your fields. Read the getting started guide

How do I get SQL from the query builder?

Call getSqlFromRules for inline SQL, or getParameterizedSql and getParameterizedNamedSql for parameterized queries. Read about import and export

Can I load a saved query back into the builder?

Yes. Call setRules with JSON, setRulesFromSql with SQL, or setMongoQuery with a MongoDB query. Mongo and SQL demo

How do I filter a Data Grid with the rules?

Pass getPredicate(getValidRules()) to a DataManager Query and assign it to the grid when ruleChange fires. Data Grid integration demo

Which data sources can it work with?

Local JSON and remote data through a DataManager, including OData and Web API services, plus nested data with sub-fields. Read about data binding

Can users drag, clone, or lock rules?

Yes. Users drag rules between groups, clone rules and groups, and lock them to prevent changes. Lock group demo

How do I customize the value editors?

Use column templates for value editors such as sliders, rule templates for the whole rule row, and header templates for group buttons and connectors. Read about templates

Can users write a filter in plain language?

Yes. The natural language query demo sends the user’s request to an AI service, which returns rules for the builder. Natural language query demo

Is the React Query Builder accessible?

Yes. It follows WAI-ARIA practices and WCAG 2.2, with keyboard interaction, screen reader support, and right-to-left layouts. Read about accessibility

Can AI coding assistants build with the React Query Builder?

Yes. The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current Query Builder docs and recommended patterns. You need a Syncfusion API key and an active license, which can be a commercial, Community, or trial license. Set up the MCP server

Is the Syncfusion React Query Builder free?

It is a commercial component with a 30-day free trial. A free Community License is available for companies and individuals with less than $1 million USD in annual gross revenue, five or fewer developers, and 10 or fewer total employees. Check Community License eligibility

Syncfusion React Query Builder

Build your React query builders faster with AI

The full Query Builder, the MCP server, and Agent Skills, free for 30 days.

  • No credit card required
  • Free Community License for eligible teams
  • No runtime or deployment fees