SOLAR // STUDIOUI
Badge
Warm-palette badge for category tags and status labels in the SOLAR light theme.
$
Or install the base component for free:
Live Preview
Open full demoUsage
TSX
<Badge variant="coral">Popular</Badge>Variants
<Badge variant="yellow">Featured</Badge>
<Badge variant="coral">Popular</Badge>
<Badge variant="sky">New</Badge>
Source
TSX
import { cn } from '@/lib/utils'
type BadgeVariant = 'yellow' | 'coral' | 'sky'
interface BadgeProps {
children: React.ReactNode
variant?: BadgeVariant
className?: string
}
const VARIANT_CLASS: Record<BadgeVariant, string> = {
yellow: 'badge--yellow',
coral: 'badge--coral',
sky: 'badge--sky',
}
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 SOLAR // STUDIO
Button
Warm-toned light-mode button with primary, secondary, and ghost variants in three sizes. Renders as a Next.js Link when an href is provided.
Card
Feature card with a blob-shaped icon background in yellow, coral, or sky, a category tag, title, and description.
Text
Polymorphic text primitive with body, caption, label, and code variants styled for the SOLAR warm light palette.