Components/Data Display
Status labels with optional live dot and remove button.
Useslucide-react
- 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://get-neonkit.vercel.app/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.
softcyanvioletmagentaamberlime
outlinecyanvioletmagentaamberlime
solidcyanvioletmagentaamberlime
sizesv2.0.0v2.0.0
Removable
onRemove renders a small close button after the label.
4 filters applied
TypeScriptMIT licenseUpdated this weekHas examples
API reference#
Badge
Renders a span and accepts every native span attribute.
| Prop | Type | Default |
|---|---|---|
variant | "soft" | "outline" | "solid"Visual style. | "soft" |
color | NeonColorPalette name or hex. Falls back to --neon-accent, then cyan. | inherited |
size | "sm" | "md"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. | — |
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.