Card
A content container for grouping related information.
Installation
pnpm dlx shadcn@latest add @columbus/cardUsage
import {
Card,
CardDescription,
CardFooter,
CardHeader,
CardPanel,
CardTitle,
} from "@/components/ui/card";
<Card>
<CardHeader>
<CardTitle>Title</CardTitle>
<CardDescription>Description</CardDescription>
</CardHeader>
<CardPanel>Content</CardPanel>
<CardFooter>Footer</CardFooter>
</Card>;CardTitle renders a <div>. When the title is a heading in your page, pass
render={<h2 />} (or the right level) so screen reader users can find it.
Header action
Put a button in CardAction inside CardHeader to place it at the top right.
Card frame
CardFrame groups cards under one header, with an optional action. Cards
inside it lose their own border and shadow so they read as one block.
API reference
This is a custom component, not a Base UI wrapper. Every part renders a <div>
and accepts every native <div> attribute, plus render. CardPanel is also
exported as CardContent.
Prop
Type
The parts are Card, CardHeader, CardTitle, CardDescription,
CardAction, CardPanel, and CardFooter, and for frames CardFrame,
CardFrameHeader, CardFrameTitle, CardFrameDescription, CardFrameAction,
and CardFrameFooter.