Brand refresh
Design
For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
Design
Engineering
Product
Design
Engineering
Product · Design
Design · Engineering
Engineering
Product
Design
Engineering
Product
$ pnpm dlx shadcn@latest add @transition-kit/filter-gridimport {
FILTER_ALL,
FilterGrid,
FilterGridFilter,
FilterGridFilters,
FilterGridItems,
FilterGridSearch,
} from "@/components/transitions/filter-grid";const projects = [
{ id: "brand", title: "Brand refresh", tags: ["Design"] },
{ id: "api", title: "Public API v2", tags: ["Engineering"] },
{ id: "pricing", title: "Pricing page", tags: ["Product"] },
];
<FilterGrid items={projects}>
<FilterGridFilters aria-label="Team">
<FilterGridFilter value={FILTER_ALL}>All</FilterGridFilter>
<FilterGridFilter value="Design">Design</FilterGridFilter>
<FilterGridFilter value="Engineering">Engineering</FilterGridFilter>
<FilterGridFilter value="Product">Product</FilterGridFilter>
</FilterGridFilters>
<FilterGridSearch placeholder="Search projects…" />
<FilterGridItems<(typeof projects)[number]>>
{(project) => <div className="rounded-lg border p-4">{project.title}</div>}
</FilterGridItems>
</FilterGrid>;const [team, setTeam] = useState("all");
<FilterGrid items={projects} filter={team} onFilterChange={setTeam}>
…
</FilterGrid>;| Prop | Type | Default | Description |
|---|---|---|---|
items | { id: string | number; tags: string[] }[] | - | Full item list, each with an id and tags. |
filter | string | - | Controlled active filter value. |
defaultFilter | string | "all" | Initial filter when uncontrolled. |
onFilterChange | (filter: string) => void | - | Called with the new filter after selection. |
query | string | - | Controlled search text. |
defaultQuery | string | "" | Initial search text when uncontrolled. |
onQueryChange | (query: string) => void | - | Called with the new query after typing settles. |
match | (item: T, query: string) => boolean | words in string fields, tags | Tests an item against the query. |
status | (shown: number, total: number) => string | "Showing 4 of 12" | Live-region message built from the shown and total counts. |
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Filter value selected by this chip. |
| Prop | Type | Default | Description |
|---|---|---|---|
debounce | number | 150 | Milliseconds of idle typing before the grid filters. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | (item: T, index: number) => ReactNode | - | Renders each visible item. |
empty | ReactNode | "Nothing matches." | Shown when no item matches the filter and search. |
reserveSpace | boolean | true | Keeps the unfiltered grid height so the page never jumps. |