Badge
Status labels with optional live dot and remove button.
Built on Icons.
- Live
neonkit-docs
main · a41f9c2 · 2m ago
- Building
api-gateway
feat/rate-limits · 7be0d13 · just now
- Failed
marketing-site
fix/hero-video · c93e4a8 · 14m ago
- Queued
billing-worker
main · 5d2f61b · 40s ago
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/badge.jsonUsage
import { Badge } from "@/components/ui/badge"
<Badge color="green" pulse>Live</Badge>Examples
Variants and sizes
Soft is the default. Outline and solid carry more light.
Removable
onRemove renders a small close button after the label.
API reference
Renders a span and accepts every native span attribute.
| Prop | Type | Default |
|---|---|---|
variant | "soft"Visual style. | "soft" |
color | NeonColorPalette name or hex. Falls back to --neon-accent, then cyan. | inherited |
size | "sm"Height, padding and type size. | "md" |
dot | booleanShows a glowing status dot before the label. | false |
pulse | booleanAdds a ping ring to the dot. Implies dot. | false |
onRemove | () => voidRenders a remove button and calls this when it is pressed. | None |
removeLabel | stringAccessible name for the remove button. | "Remove" |
Accessibility
- The dot is decorative, so the label text has to carry the status on its own.
- Give each remove button a specific removeLabel, such as "Remove TypeScript filter", when several badges sit together.
- The ping animation stops when the user prefers reduced motion.