Skip to content
Redpanda UI
Esc
↑↓navigate↵open⌘Jpreview
Made by haydenbleasel
Edit on GitHub

Tags

Tags are a way to apply multiple labels to an item.

Installation

bash
npx shadcn@latest add @redpanda/tags
bash
pnpm dlx shadcn@latest add @redpanda/tags
bash
yarn dlx shadcn@latest add @redpanda/tags
bash
bunx shadcn@latest add @redpanda/tags
bash
nubx shadcn@latest add @redpanda/tags
bash
aube dlx shadcn@latest add @redpanda/tags

When to use

Tags provide a way to apply multiple labels to items. Use this decision tree:

Features

  • Built-in search input to filter through tags
  • Supports both controlled and uncontrolled usage
  • Caller-owned layout through className; shared recipes own control appearance
  • Automatically adjusts width based on parent container
  • Optional remove button for selected tags
  • Full keyboard navigation support through Command component
  • Shared state management through TagsContext

Examples

Removable values

Provide an item-specific action name whenever onRemove is present. Values without removal do not accept removeLabel. Keyboard removal returns focus to the picker without opening it.

tsx
<TagsValue onRemove={removeReact} removeLabel="Remove React">  React</TagsValue>

Removal actions use the standard destructive-ghost icon Button. Its larger target intentionally increases chip height compared with the old miniature custom button.

Default

Filter

Credits

  • We use Kibo UI for the tags component and style.

Recent changes

  • patchv1.2.0Pin shipped dependency floors to the version we develop against. Registry items now declare ranges like `^5.1.9` (the actual installed version) instead of collapsing to `^5.0.0`, so consumers start on the known-tested baseline while caret semantics still allow any compatible release within the same major.#133
  • minorv1.1.0Theme docs refresh, readability pass on semantic foregrounds, and consumer-facing Base UI regression fixes.#121
  • minorv1.0.0Post-Base-UI polish. Public API unchanged.#116
  • majorv1.0.0Migrate every Radix-based primitive to `@base-ui/react@^1.4.0` (Base UI).#114
  • minorv0.3.0Add theme-provider component to the registry with documentation and tests. Includes playground type improvements (export RegistryItem, remove as-const boilerplate) and docs site dark mode border color fix.#109
See full history →

Last updated on

Was this page helpful?