Badge
A small status label, with an optional leading dot.
import
import { Badge } from '@joshicodes/cock';Variants
Draft Featured Active Pending Overdue New v0.1.0 Hard-coded
API
Read out of the component sources at build time, so it matches the version you installed.
Every component also takes class, merged
through tailwind-merge so your utility wins.
Props of Badge
| Prop | Type | Default |
|---|---|---|
variant | BadgeVariant | 'neutral' |
size | 'sm' | 'md' | 'md' |
dot Show a small leading status dot. | boolean | false |
class | string | — |
Anything else is forwarded to the underlying element, typed as HTMLAttributes.
Snippets of Badge
| Snippet | Type | Default |
|---|---|---|
children | Snippet | — |