Badges
Badge component in seven colors, filled or outlined, rounded, with icons and an optional dismiss button for tags.
How to use it
Run npx @blossomui/react add badge, or copy src/components/UI/Badges/Badge.tsx into your React project and import it.
import { Badge } from './components/ui/Badge'Props
BadgeProps
| Prop | Type | Description |
|---|---|---|
| dismissLabel | string | Accessible name of the dismiss button. |
| color | BadgeColor | (string & {}) | A preset, `accent` for the brand color or any CSS color, for example `#7c3aed`. |
| outlined | boolean | Border instead of the soft filled style. |
| rounded | boolean | Fully rounded corners. |
| icon | ReactNode | Icon shown before the text. Without children it renders a compact icon-only badge. |
| onDismiss | () => void | When set, a close button is shown and this is called when it is pressed. |