Skip to content

react-querybuilder/react-querybuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Query Builder

npm Demo Docs Learn from the maintainer Chat

CI codecov.io All Contributors

React Query Builder is a fully customizable query builder component for React, along with a collection of utility functions for importing from, and exporting to, various query languages like SQL, MongoDB, and more. Demo is here.

Complete documentation is available at react-querybuilder.js.org.

Screenshot

Getting started

To get started, import the main component and the default stylesheet, then render the component in your app:

import { QueryBuilder } from 'react-querybuilder';
import 'react-querybuilder/dist/query-builder.css'; // or .scss

export function App() {
  const [query, setQuery] = useState({
    combinator: 'and',
    rules: [],
  });

  return <QueryBuilder defaultQuery={query} onQueryChange={setQuery} />;
}

For a more complete introduction, see the main package README, dive into the full documentation, or browse the example projects.

To enable drag-and-drop functionality, use the @react-querybuilder/dnd package.

For instructions on migrating from earlier versions of react-querybuilder, click here.

Compatibility packages

Ant Design Bootstrap Bulma Chakra UI
Fluent UI Mantine MUI React Native Tremor

In addition to the main react-querybuilder package, this repo also hosts official compatibility component packages for use with several popular style libraries including Ant Design, Bootstrap, Bulma, Chakra UI, Fluent UI, Mantine, MUI, and Tremor. A React Native component is also available.

Development

See the contribution guidelines.

Credits

This component was inspired by prior work from:

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Jake Boone
Jake Boone

💻 📖 🚧 ⚠️
Pavan Podila
Pavan Podila

💻 📖 ⚠️
Andrew Turgeon
Andrew Turgeon

💻 ⚠️
André Drougge
André Drougge

💻 ⚠️
Oumar Sharif DAMBABA
Oumar Sharif DAMBABA

💻
Arte Ebrahimi
Arte Ebrahimi

💻 📖 ⚠️
Carlos Azuaje
Carlos Azuaje

💻
Srinivas Damam
Srinivas Damam

💻
Matthew Reishus
Matthew Reishus

📖
Anish Duwal
Anish Duwal

💻 ⚠️
RomanLamsal1337
RomanLamsal1337

💻
Dmitriy Kolesnikov
Dmitriy Kolesnikov

💻
Vitor Barbosa
Vitor Barbosa

💻
Laxminarayana
Laxminarayana

💻 📖
Christian Mund
Christian Mund

💻 📖
Dallas Larsen
Dallas Larsen

💻
Ayush Srivastava
Ayush Srivastava

📖
Fabio Espinosa
Fabio Espinosa

💻 📖 ⚠️
Anatoly Bubenkov
Anatoly Bubenkov

💻 📖 ⚠️
Saurabh Nemade
Saurabh Nemade

💻 ⚠️
Edwin Xavier
Edwin Xavier

💻 📖
Code Monk
Code Monk

💻 📖 ⚠️
ZigZagT
ZigZagT

💻
mylawacad
mylawacad

💻
Kyrylo Stepanchuk
Kyrylo Stepanchuk

💻
Kasey Culmback
Kasey Culmback

💻
Ahmed Fasih
Ahmed Fasih

💻
Austin Stowe
Austin Stowe

💻
Manuel
Manuel

📖
Victor Arowo
Victor Arowo

📖
Ekin Koc
Ekin Koc

💻
Zach Blume
Zach Blume

💻
王恒
王恒

📖
Jan Bednář
Jan Bednář

💻 ⚠️
Stephen Peery
Stephen Peery

💻 ⚠️
stil
stil

💻 ⚠️
Chiawei Ong
Chiawei Ong

💻 ⚠️
De Lille Felix
De Lille Felix

💻 ⚠️
Raphaël Bideau
Raphaël Bideau

💻
Dave Anderson
Dave Anderson

💻

This project follows the all-contributors specification. Contributions of any kind welcome!