Tag
Dismissible chip with optional count, for filters and selections.
DesignEngineeringHealth techRemote
Try dismissing one; the demo is live.
Install
npx shadcn@latest add https://plinth.dhrumilkherde.com/r/tag.jsonUsage
import { Tag } from "@/components/ui/tag";
<Tag count={4} onDismiss={() => removeFilter(id)}>Health tech</Tag>Sizes
SmallMediumLarge
Props
| Prop | Type | Default |
|---|---|---|
size | sm · md · lg | md |
count | number | — |
onDismiss | () => void | — |
Accessibility
- The remove control is a real
buttonwitharia-label="Remove", so it's keyboard reachable and announced correctly. - Dismissal is controlled by you; removing the tag from the DOM after
onDismisskeeps focus management predictable if you move focus to the next tag or the list container.