DINK // NEXTUI
Badge
Pill badge with bold borders and color variants. Yellow, cobalt, coral, and green options for retro-toy labeling.
$
Or install the base component for free:
Live Preview
Open full demoUsage
TSX
<Badge variant="yellow">Design</Badge>Variants
<Badge variant="yellow">Design</Badge>
<Badge variant="cobalt">Engineering</Badge>
<Badge variant="coral">Urgent</Badge>
<Badge variant="green">Shipped</Badge>
Source
TSX
import { cn } from '@/lib/utils'
type BadgeVariant = 'yellow' | 'cobalt' | 'coral' | 'green'
interface BadgeProps {
children: React.ReactNode
variant?: BadgeVariant
className?: string
}
const VARIANT_CLASS: Record<BadgeVariant, string> = {
yellow: 'badge--yellow',
cobalt: 'badge--cobalt',
coral: 'badge--coral',
green: 'badge--green',
}
export function Badge({
children,
variant = 'yellow',
className,
}: BadgeProps): React.JSX.Element {
return (
<span className={cn('badge', VARIANT_CLASS[variant], className)}>
{children}
</span>
)
}
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from DINK // NEXT
Button
Retro-toy button with bold 3px borders and flat offset shadows. Solid, outline, and ghost variants in a playful cream and cobalt palette.
Text
Typography utility with heading, body, caption, and code variants. Fredoka display font for headings, DM Sans for body text.
Card
Feature card with icon, badge, title, and description. Bold borders and flat offset shadow on a cream background.