Card

Data Display

macOS container card with header, title, description, content, and footer.

Installation

$npx shadcn-macos@latest add card

Examples

Storage Volume

Macintosh HD · APFS Encrypted

Available: 412.8 GB of 1 TB

Props

<Card />
PropTypeDefaultDescription
classNamestringAdditional CSS class names.
childrenReact.ReactNodeCard header, content, or footer elements.
<CardWindowHeader />
PropTypeDefaultDescription
titlestringTitle rendered in the center of the window header.
showTrafficLightsbooleantrueWhether window action traffic light buttons are visible.
onClose() => voidRed close button click handler.
onMinimize() => voidYellow minimize button click handler.
onMaximize() => voidGreen maximize / zoom button click handler.
<CardHeader />
PropTypeDefaultDescription
classNamestringCustom classes.
childrenReact.ReactNodeHeader content.
<CardContent />
PropTypeDefaultDescription
classNamestringCustom classes.
childrenReact.ReactNodeBody elements.
<CardFooter />
PropTypeDefaultDescription
classNamestringCustom classes.
childrenReact.ReactNodeFooter action buttons.