Components
Badge
StableCompact labels for status, category, and metadata. Follows the shadcn Badge system with MNEE semantic extensions. Accepts an optional icon slot for leading icons.
Variants
DefaultSecondaryDestructiveOutlineCompletedPendingInfo
With icon
Pass any Lucide icon (or any node) to the icon prop. It renders before the label and inherits the variant's text color.
CompletedPendingFailedInfoDefaultSecondaryOutline
Usage
import { Badge } from "@mnee-ui/ui"import { CircleCheck } from "lucide-react"const statusVariant = { COMPLETED: "success", PENDING: "warning", FAILED: "destructive",} as const<Badge variant={statusVariant[tx.status] ?? "secondary"} icon={<CircleCheck className="size-3" />}> {tx.status}</Badge>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "info" | "default" | Visual style |
| icon | React.ReactNode | — | Leading icon, e.g. <CircleCheck className="size-3" /> |
| children | React.ReactNode | — | Badge label |
| className | string | — | Layout overrides (margin, width) |
Token mapping
| Variant | Background | Text |
|---|---|---|
| default | bg-brand (#D97706) | text-white |
| secondary | #f5f5f5 | #0a0a0a |
| destructive | bg-error (#B91C1C) | text-white |
| outline | transparent | #0a0a0a (border: surface-border) |
| success | bg-success (#15803D) | text-white |
| warning | bg-surface-border (#E5E5E5) | #737373 |
| info | #0d74ce | text-white |