Card
A composable card container with header, title, description, action, content, and footer sub-components, supporting a compact "sm" size variant.
Default
Content Only
Grid Layout
Sizes
size="default"
size="sm"
With Action
With Image
Installation
npx shadcn@latest add @byronwade/cardProps
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "default" | "sm" | "default" | Controls padding and text size across all child slots; "sm" produces a more compact layout. |
| className | string | — | Additional CSS classes merged onto the root div. |
| children | React.ReactNode | — | Slot content — typically CardHeader, CardContent, CardFooter, and related sub-components. |