Skip to content
Pixelbits
Docs / Tag
Core

Tag

A token for applied filters, selected values or keywords, optionally removable.

reacttailwind v4native dialog

Installation

npm: import
import { Tag } from "pixelbits/tag";
shadcn: copy the source
npx shadcn add https://pixelbits.ali-moradi-develop.com/r/tag.json

API

<Tag>

A token for applied filters, selected values or keywords, optionally removable.

Example
<Tag onRemove={() => remove("react")}>react</Tag>
PropTypeDefaultDescription
children*ReactNode—

The tag text (or any inline content).

onRemove() => void—

When set, shows a small × button that calls this function. Without it the tag is static.

removeLabelstring`"Remove " + children` when `children` is a string

Accessible name of the remove button.

Also accepts every prop of Omit<HTMLAttributes<HTMLSpanElement>, "children">.