Card
Card groups related content with a subtle border, card background, and shadow. The compound parts are unstyled wrappers with sensible padding, so they compose with any layout.
Card ships with a full API table, a copyable example, and accessibility notes.
Monthly usage
Requests across all providers.
Installation
Install the package once, then import Card from its direct entry point or from the root.
pnpm add @agent-ui/reactimport { Card } from "@agent-ui/react/card";Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
The example below is the same code that renders the preview. Copy it, swap in your own handlers, and ship.
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@agent-ui/react"; <Card> <CardHeader> <CardTitle>Usage</CardTitle> <CardDescription>Requests this month</CardDescription> </CardHeader> <CardContent>12,480</CardContent></Card>API reference
Every prop Card accepts, its type, default, and behaviour.
| Name | Type | Default | Description |
|---|---|---|---|
| className | string | — | Merged onto the root surface. |
| children | ReactNode | — | Card parts or arbitrary content. |
Compound parts
Card exposes these parts for composition.
| Part | Description |
|---|---|
| CardHeader | Vertical stack with p-6 padding. |
| CardTitle | h3 heading, 2xl semibold, tight tracking. |
| CardDescription | Muted small paragraph. |
| CardContent | p-6 wrapper without top padding. |
| CardFooter | Horizontal flex row, p-6 without top padding. |
Card composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
9 lines · copy-ready