Card
A surface component for grouping related content, with elevated, filled, outlined, horizontal, and framed layouts.
All 42 tests passed. Build time: 1m 23s.
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function Particle() {
return (
<Card className="w-80">
<CardHeader>
<CardTitle>Project Update</CardTitle>
<CardDescription>
Your project has been successfully deployed to production.
</CardDescription>
</CardHeader>
<CardContent>
<p className="text-muted-foreground text-sm">
All 42 tests passed. Build time: 1m 23s.
</p>
</CardContent>
<CardFooter className="gap-2">
<Button size="sm">View Details</Button>
<Button size="sm" variant="ghost">
Dismiss
</Button>
</CardFooter>
</Card>
);
}
Installation
pnpm dlx shadcn@latest add @taut-ui/card
Usage
import {
Card,
CardAction,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card"<Card>
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content.</p>
</CardContent>
<CardFooter>
<Button size="sm">Action</Button>
</CardFooter>
</Card>Examples
Elevated
Upgrade your plan anytime to unlock unlimited workspace storage.
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function Particle() {
return (
<Card className="w-80" variant="elevated">
<CardHeader>
<CardTitle>Storage Usage</CardTitle>
<CardDescription>14.2 GB of 20 GB used</CardDescription>
</CardHeader>
<CardContent>
<p className="text-muted-foreground text-sm">
Upgrade your plan anytime to unlock unlimited workspace storage.
</p>
</CardContent>
</Card>
);
}
Outlined with Action
Includes priority support, custom domains, and team analytics.
import { Badge } from "@/components/ui/badge";
import {
Card,
CardAction,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function Particle() {
return (
<Card className="w-80" variant="outlined">
<CardHeader>
<CardTitle>Pro Plan</CardTitle>
<CardDescription>Billed monthly</CardDescription>
<CardAction>
<Badge variant="success">Active</Badge>
</CardAction>
</CardHeader>
<CardContent>
<p className="text-muted-foreground text-sm">
Includes priority support, custom domains, and team analytics.
</p>
</CardContent>
</Card>
);
}
Horizontal
import { ArrowRightIcon, FolderIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Card,
CardAction,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function Particle() {
return (
<Card className="w-80" orientation="horizontal" variant="filled">
<div className="flex size-11 shrink-0 items-center justify-center rounded-2xl bg-card text-foreground">
<FolderIcon className="size-5" />
</div>
<CardHeader>
<CardTitle>Design Assets</CardTitle>
<CardDescription>24 files · Updated 2h ago</CardDescription>
<CardAction>
<Button aria-label="Open folder" size="icon-sm" variant="ghost">
<ArrowRightIcon />
</Button>
</CardAction>
</CardHeader>
</Card>
);
}
Interactive
import { ArrowUpRightIcon } from "lucide-react";
import {
Card,
CardAction,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function Particle() {
return (
<Card
className="w-80"
render={<button type="button" />}
ripple
variant="outlined"
>
<CardHeader>
<CardTitle>Getting Started</CardTitle>
<CardDescription>
Install components and configure your theme tokens in minutes.
</CardDescription>
<CardAction>
<ArrowUpRightIcon className="size-4 text-muted-foreground" />
</CardAction>
</CardHeader>
</Card>
);
}
Card Frame
Receive product updates, weekly digests, and security alerts directly in your inbox.
import { Button } from "@/components/ui/button";
import {
CardFrame,
CardFrameAction,
CardFrameDescription,
CardFrameFooter,
CardFrameHeader,
CardFramePanel,
CardFrameTitle,
} from "@/components/ui/card";
export default function Particle() {
return (
<CardFrame className="w-96">
<CardFrameHeader>
<CardFrameTitle>Notifications</CardFrameTitle>
<CardFrameDescription>
Choose how you want to be notified.
</CardFrameDescription>
<CardFrameAction>
<Button size="xs" variant="outline">
Reset
</Button>
</CardFrameAction>
</CardFrameHeader>
<CardFramePanel>
<p className="text-muted-foreground text-sm">
Receive product updates, weekly digests, and security alerts directly
in your inbox.
</p>
</CardFramePanel>
<CardFrameFooter>
<span className="text-muted-foreground text-xs">
Last updated just now
</span>
<Button size="xs">Save</Button>
</CardFrameFooter>
</CardFrame>
);
}
API Reference
Card
The root surface container. Supports polymorphic rendering via Base UI useRender (such as <a> or <button> for interactive cards).
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "elevated" | "filled" | "outlined" | "default" | Surface style variant |
orientation | "vertical" | "horizontal" | "vertical" | Layout direction of the card |
ripple | boolean | false | Enables Material ripple feedback on pointer press |
render | React.ReactElement | ((props, state) => React.ReactElement) | - | Custom element to render (e.g. <Link /> or <button />) |
className | string | - | Additional CSS classes |
...props | React.ComponentProps<"div"> | - | All standard div attributes are supported |
CardHeader
Grid header container that automatically accommodates a CardTitle, CardDescription, and an optional CardAction.
CardTitle
Displays the heading of the card.
| Prop | Type | Default | Description |
|---|---|---|---|
size | "md" | "lg" | "md" | Title typography scale |
className | string | - | Additional CSS classes |
CardDescription
Secondary muted text positioned beneath CardTitle.
CardAction
Right-aligned slot inside CardHeader for a badge, icon, or action button.
CardMedia
Media wrapper for <img> or <video> elements, adapting automatically when orientation="horizontal".
CardPanel / CardContent
Main body container of the card. Automatically adjusts vertical padding when paired with CardHeader or CardFooter.
CardFooter
Horizontal action row at the bottom of the card.
CardFrame
Outer muted frame (rounded-3xl bg-muted p-1.5) for grouping a CardFrameHeader, CardFramePanel (or stacked Cards), and CardFrameFooter.
CardFrameHeader / CardFrameTitle / CardFrameDescription / CardFrameAction
Header slots rendered directly on the outer CardFrame surface.
CardFramePanel / CardFrameContent
Inner elevated card surface (rounded-2xl bg-card p-6) inside CardFrame.
CardFrameFooter
Bottom row inside CardFrame for metadata and actions.