Badges
Self-labeling status badges: fellow, capability, status, source, active, deprecated.
A family of small, self-labeling status badges. Each takes a plain value (a status key, a capability key, a boolean) and renders a localized label with the right icon and color — the copy comes from the injected i18n adapter, so you only pass the data.
Import
import {
FellowBadge, CapabilityBadge, StatusBadge,
SourceBadge, ActiveBadge, DeprecatedBadge,
} from "@yuhuanowo/yunui/patterns";
FellowBadge
The recognition mark for an approved Fellows-tier member. Use variant="pill" for a bordered chip or the default inline for a lightweight inline mark.
FellowBadge
CapabilityBadge
A colored, icon-led badge for a model capability. Pass a capability key such as chat, vision, thinking, streaming, or function_calling.
CapabilityBadge
StatusBadge
An approval-status pill. Pass a status of pending, approved, auto_approved, or rejected, with an optional size.
StatusBadge
SourceBadge
Marks where a record came from. Pass a source of yaml or api; hide the icon with showIcon={false}.
SourceBadge
ActiveBadge & DeprecatedBadge
ActiveBadge reflects an isActive boolean; DeprecatedBadge renders only when isDeprecated is true.
ActiveBadge / DeprecatedBadge
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| variant | "inline" | "pill" | inline |
| Prop | Type | Default | Description |
|---|---|---|---|
| capability* | string | — | |
| short | boolean | false |
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "sm" | "md" | sm | |
| status* | string | — |
| Prop | Type | Default | Description |
|---|---|---|---|
| showIcon | boolean | true | |
| source* | string | — |
| Prop | Type | Default | Description |
|---|---|---|---|
| isActive* | boolean | — |
| Prop | Type | Default | Description |
|---|---|---|---|
| isDeprecated* | boolean | — |