Appearance
Badge
Chip status / meta. Mặc định pastel soft; có solid | outline | secondary.
ts
import { Badge } from "@minap/ui";Examples
Mẫu sống trong Preview; chọn View code khi cần copy.
Usage
tsx
import { Badge } from "@minap/ui";
export function Example() {
return (
<>
<div className="flex flex-wrap gap-2">
<Badge>primary soft</Badge>
<Badge color="success">success soft</Badge>
<Badge color="warning">warning soft</Badge>
<Badge color="destructive">destructive soft</Badge>
<Badge color="info">info soft</Badge>
<Badge color="success" variant="solid">
success solid
</Badge>
<Badge variant="secondary">secondary</Badge>
<Badge variant="outline">outline primary</Badge>
<Badge color="destructive" variant="outline">
outline destructive
</Badge>
</div>
</>
);
}Props / API
| Prop / API | Type | Default | Notes |
|---|---|---|---|
color | "primary" | "success" | "warning" | "destructive" | "info" | "primary" | Omit → primary |
variant | "soft" | "solid" | "outline" | "secondary" | "soft" | soft = fill *-soft (kiểu Active); secondary bỏ qua color |
className | string | — |
Behavior
- soft mặc định khớp chip status mobile (token *-soft)
- có solid | outline | secondary