Skip to content
Primitives

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

PropTypeDefault
variant
BadgeVariant'neutral'
size
'sm' | 'md''md'
dot

Show a small leading status dot.

booleanfalse
class
string—

Anything else is forwarded to the underlying element, typed as HTMLAttributes.

Snippets of Badge

SnippetTypeDefault
children
Snippet—

See also

cock. Yes, it stands for core component kit. We checked twice.