Tags in a box that grows: Enter or a comma adds, a ghost completes the first suggestion, a pasted list adds each tag, ⌫ arms the last tag and ⌫ again removes it, with capacity nodes and a count.
pnpm dlx shadcn@latest add @beautiful-ui-pro/token-fieldNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The 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 { TokenField } from "@/components/ui/notchset/token-field";
export function RunTags() {
const [tags, setTags] = React.useState<string[]>(["prod"]);
return <TokenField value={tags} onValueChange={setTags} suggestions={["prod", "staging", "nightly"]} />;
}value / onValueChange–
string[]Controlled.
suggestions–
string[]For the ghost completion.
max–
numberThe limit (6).
normalize–
(s) => stringLowercase kebab-case, 24 characters, by default.
components/ui/notchset/token-field.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.