YuhuanStudioYunUIDocs
AI

Model Card

A card summarizing an AI model — icon, capabilities, ids, and a developer/context/price footer.

A card that summarizes an AI model: a provider/model icon, the display name, capability chips, copyable id badges, a short description, and a footer with the developer, context window, tier, and price. Pass onClick to make the whole card a keyboard-activatable button.

Import

tsx1 line
import { ModelCard } from "@yuhuanowo/yunui/ai";

Basic

The icon slot is host-rendered — pass a <ProviderIcon> (or <ModelIcon>) so the card stays framework-agnostic.

Basic

openai
GPT-4o
Multimodal flagship model with vision and fast responses.
OpenAI
128K$2.50/M

Status badges

Use nonofficial and suspended to flag a model's availability. A tier chip is shown unless it is "free".

Status badges

anthropic
Claude Opus 4Unofficial
High-reasoning model for complex, long-running tasks.
Anthropic
200Kpro

Clickable card with copyable IDs

When onClick is provided, the card body selects the model while each ID badge remains its own copy action. This host fixture makes both actions available in the live preview.

Clickable card and independent copy actions

openai
GPT-4o
Click the body to select; each model ID remains a separate copy action.
OpenAI
128K$2.50/M
No model selected

Props

PropTypeDefaultDescription
capabilitiesstring[][]Capability keys (e.g. "vision", "thinking") → coloured icons (first 4 shown).
classNamestring—
contextstring—e.g. "128K" or "1024×1024".
descriptionReactNode—Short description (falls back to a "No description" label).
developer{ label: string; iconUrl?: string; }—Developer/maker shown in the footer, with an optional icon.
iconReactNode—Avatar slot — host renders the provider/model icon.
idsstring[][]Primary id + aliases, shown as mono badges.
labels{ nonofficial?: string; suspended?: string; noDescription?: string | undefined; } | undefined—Localized strings for the unofficial/suspended badges and the empty-description fallback.
name*string—Model display name.
nonofficialboolean—Mark the model as unofficial (shows a warning badge).
onClick(() => void)—Makes the whole card a clickable button (keyboard-activatable).
priceReactNode—Formatted price node, e.g. "$0.50/M".
suspendedboolean—Mark the model as suspended (shows a paused badge).
tierstring—Optional tier chip (e.g. "pro"); a `"free"` tier is hidden.

On this page