About
A small toggleable button used to filter a list or switch between categories, with a rectangular "filter" look and a pill-shaped "tab" look that can show a count.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Filter Chip to your project and fits it to your theme.
Code
How Filter Chip is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Chip from "@/components/ui/chip";
import { useTheme } from "@/components/ui/chip-utils/theme";
import { useState } from "react";
export default function ChipDemo() {
const { C } = useTheme();
const [active, setActive] = useState("Mine");
const chips = ["All", "Mine", "Important", "Done"];
return (
<div
style={{
display: "flex",
gap: 8,
flexWrap: "wrap",
alignItems: "center",
padding: 24,
background: C.canvas,
}}
>
{chips.map((c) => (
<Chip
key={c}
label={c}
active={c === active}
onClick={() => setActive(c)}
/>
))}
</div>
);
}







