One applied filter or picked value, with its own remove.
Every shadcn style · one file
v2.0 · Updated Oct 13pnpm dlx shadcn@latest add https://notchset.dev/r/chip.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/chip.jsonFree, no account or key. One command for every shadcn style. With the @notchset registry added, @notchset/<name> works too.
Works with React 18.3 or 19 on Tailwind CSS v4, in any shadcn project. What's tested
pnpm add lucide-react@^1The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { Button } from "@/components/ui/notchset/button";
import { Chip } from "@/components/ui/notchset/chip";
const ALL = ["Owner: Ana Ruiz", "Stage: Proposal", "Closes this quarter"];
export default function ChipDemo() {
const [chips, setChips] = React.useState(ALL);
const root = React.useRef<HTMLDivElement>(null);
/* the control that takes focus once the focused one is gone: the next chip's remove, else the one before, else
Reset; after Reset, the first chip's. Focus you moved elsewhere is left alone */
const land = React.useRef<string | null>(null);
React.useEffect(() => {
const to = land.current;
land.current = null;
if (!to) return;
const a = document.activeElement;
if (a && a !== document.body && a.isConnected) return;
root.current?.querySelector<HTMLElement>(to === "reset" ? "[data-reset]" : `[aria-label="Remove ${CSS.escape(to)}"]`)?.focus();
}, [chips]);
const remove = (c: string) => {
const i = chips.indexOf(c);
const rest = chips.filter((x) => x !== c);
land.current = rest[i] ?? rest[i - 1] ?? "reset";
setChips(rest);
};
return (
<div ref={root} className="flex flex-wrap items-center gap-2">
{chips.map((c) => (
<Chip key={c} onRemove={() => remove(c)}>
{c}
</Chip>
))}
{chips.length < ALL.length && (
<Button
size="sm"
variant="ghost"
data-reset=""
onClick={() => {
land.current = ALL[0]!;
setChips(ALL);
}}
>
Reset
</Button>
)}
<Chip>Read only</Chip>
</div>
);
}This example also uses Button. This command installs them with it, so the example pastes as it is:
pnpm dlx shadcn@latest add https://notchset.dev/r/chip.json https://notchset.dev/r/button.jsoncomponents/ui/notchset/chip.tsx
onRemove–
() => voidremoveLabel–
stringWhat the remove button says; defaults to "Remove" plus the chip's text when that is a string.
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v2.0.0 · 2026-10-13
Released with the Notchset system.
The same file, at work in a finished app. Open it live and find it on its pages.