Query Builder

Filter query builder that chains field, operator and value clauses with AND. Add or remove rows, each with labelled selects, built in React and Tailwind.

src/registry/ui/query-builder.tsx/r/query-builder.json
Where
AND

Interactive

Installation#

bash
npx shadcn@latest add @minidev/query-builder

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/query-builder.json

Usage#

tsx
import { QueryBuilder } from "@/components/ui/query-builder"

export function Example() {
  return (
    <QueryBuilder />
  )
}

API reference#

QueryBuilder props
PropTypeDefault
classNamestring-

Dependencies#

npm

lucide-react

Examples#

All data table components