Filter Group
A collapsible filter block with a smoothly animated body; the closed body is inert so it leaves the tab order.
npx shadcn@latest add https://ui.develop-better-solutions.com/r/filter-group.jsonDependencies:
lucide-react- Fruits
- Vegetables
- Juices
Next day, chilled.
Usage
filter-group-example.tsx
"use client";
import { FilterGroup } from "@dbs/ui";
export default function FilterGroupExample() {
return (
<div className="w-full max-w-sm rounded-2xl border border-line p-6">
<FilterGroup title={<>Refine by <strong className="font-bold">category</strong></>}>
<ul className="space-y-2 text-sm text-ink-muted">
<li>Fruits</li>
<li>Vegetables</li>
<li>Juices</li>
</ul>
</FilterGroup>
<FilterGroup title="Delivery" defaultOpen={false}>
<p className="text-sm text-ink-muted">Next day, chilled.</p>
</FilterGroup>
</div>
);
}