Install with shadcn

Add the coss ui query builder or any example to your project as source, with one command.

The site is a shadcn registry. shadcn add copies qnot's coss ui query builder, or a whole example, into your project as source you own, installs the npm packages it needs (@qnot/core, @qnot/react, lucide-react), and pulls the coss ui components it uses from coss's own registry.

Before you start

Your project needs Tailwind CSS v4 and a components.json. If you don't use coss ui yet, set it up first:

pnpm dlx shadcn@latest init @coss/style

Files land under components/qnot/ (your components alias), and their imports are rewritten to your aliases. Everything installed from this registry is MIT licensed.

The query builder

pnpm dlx shadcn@latest add https://coss.com/qnot/r/query-builder.json
'use client';
import { createQueryStore, defineFields, f } from '@qnot/core';
import { useState } from 'react';
import { CossQueryBuilder } from '@/components/qnot/query-builder';

const fields = defineFields({ name: f.text(), age: f.number({ min: 0 }), plan: f.enum(['free', 'pro']) });

export function Filters() {
  const [store] = useState(() => createQueryStore({ fields }));
  return <CossQueryBuilder store={store} showLock />;
}

Other UI kits

The builder also comes in shadcn/ui, MUI and plain-HTML variants, the ones on the UI kits page. Each one installs query-builder-core, the kit-agnostic builder they share (components/qnot/kits/shared), plus the kit's own controls:

pnpm dlx shadcn@latest add https://coss.com/qnot/r/query-builder-mui.json
'use client';
import { createQueryStore } from '@qnot/core';
import { useState } from 'react';
import { QueryBuilder } from '@/components/qnot/kits/mui';
import { fields } from './fields';

export function Filters() {
  const [store] = useState(() => createQueryStore({ fields }));
  return <QueryBuilder store={store} />;
}

An example

Every example is a registry block: the page shows its full source and the command to install it. Each example exports a Demo component:

pnpm dlx shadcn@latest add https://coss.com/qnot/r/product-filters.json
import { Demo as ProductFilters } from '@/components/qnot/examples/product-filters';

export default function Page() {
  return <ProductFilters />;
}

Every item

ItemWhat it isInstalls
tipA coss tooltip around any element, used by the qnot builder's actions.
components/qnot/tip.tsx
query-builderA complete qnot query builder made of coss ui components: typed fields, value/field/function operands, list conditions, locks, drag and drop, undo-ready.
components/qnot/query-builder.tsx
components/qnot/controls.tsx
query-builder-coreThe kit-agnostic qnot builder: layout, editors and wiring over @qnot/react, rendered through a small Kit interface. The kit variants below plug their controls into it.
components/qnot/kits/shared/kit.ts
components/qnot/kits/shared/builder.tsx
components/qnot/kits/shared/draft.ts
query-builder-shadcnThe qnot query builder made of shadcn/ui components, for Radix-based shadcn/ui projects.
components/qnot/kits/shadcn.tsx
query-builder-muiThe qnot query builder made of Material UI components, with its own light/dark theme.
components/qnot/kits/mui.tsx
query-builder-headlessThe qnot query builder in plain HTML elements and Tailwind classes: the starting point for your own design system.
components/qnot/kits/headless.tsx
code-blockA copyable code block in a content-sized coss scroll area, with optional lazy syntax highlighting (sql, json, typescript).
components/qnot/code-block.tsx
components/qnot/scroll-box.tsx
components/qnot/highlight.ts
describeRender a qnot query as a plain-English sentence with the text codec.
components/qnot/describe.ts
example-utilsuseExampleStore, useLiveQuery and a seeded random generator, shared by the qnot examples.
components/qnot/examples/shared.ts
linear-filtersInline filter chips: the same hooks, a completely different UI
components/qnot/examples/linear-filters.tsx
workflow“When a booking is created and …, then …” with a live event log
components/qnot/examples/workflow.tsx
saved-viewsNamed views, dirty tracking, undo/redo, and queries as plain English
components/qnot/examples/saved-views.tsx
product-filtersFaceted search over a catalogue, filtered client-side with compile()
components/qnot/examples/product-filters.tsx
segmentsMarketing segments with a live audience count and parameterized SQL
components/qnot/examples/segments.tsx
feature-flagsSegment rules + percentage rollout, shipped to the edge as JsonLogic
components/qnot/examples/feature-flags.tsx
alertingThresholds, ranges and field-vs-field checks over a live metric stream
components/qnot/examples/alerting.tsx
access-policyAllow-if rules with NOT-group denies, plus a request simulator
components/qnot/examples/access-policy.tsx
rqb-dropinKeep your saved RQB JSON: the store speaks its format via `format: rqb`
components/qnot/examples/rqb-dropin.tsx
server-sideThe same query as Postgres, MySQL, SQL Server, MongoDB and JsonLogic
components/qnot/examples/server-side.tsx

Items depend on each other where they share code, so installing an example brings the builder and helpers it uses. Running shadcn add again asks before overwriting files you've changed.