Describe an audience in a few rules and watch it form: the head count rolls, the size bar slides, and real people from your sample glide in and out of the list as each rule tightens or loosens.
akasegment builder·audience builder·cohort
Powered by Qnot · the rules, matching and serialisation are Qnot; this is the UI on top.
Run this in any project set up for the shadcn CLI. It copies the Segment Builder source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/segment-builder.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { SegmentBuilder } from "@/components/segment-builder";
export default function Page() {
return <SegmentBuilder />;
}A free React component in the Filters collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Segment Builder source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| fieldsrequired | Fields | — |
| peoplerequired | readonly SegmentPerson[] | — |
| defaultName | string | "Untitled segment" |
| defaultQuery | Query | { kind: "group", combinator: "and", children: [] } |
| sampleSize | number | 5 |
| describe | (person: SegmentPerson) => string | — |
| onChange | (segment: { name: string; query: Query; size: number }) => void | — |
| className | string | — |