Skip to content

Cards

Card is the standard surface for grouping related content into a bordered, slightly elevated container. It is a set of composable parts (CardHeader, CardTitle, CardDescription, CardContent, CardFooter) that you assemble to fit the content, so a card can be as simple as a single body or as rich as a titled panel with actions in the footer.

Live demo

The interactive story below runs from the deployed Storybook.

Usage

Source: card.tsx

import {
Card,
CardHeader,
CardTitle,
CardDescription,
CardContent,
CardFooter,
Button,
} from "@beacon/design-system";
<Card className="w-[350px]">
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content and body text lives in here.</p>
</CardContent>
<CardFooter className="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Deploy</Button>
</CardFooter>
</Card>;

Parts

PartRole
CardOuter container with border, background, rounded corners, and a subtle shadow.
CardHeaderTop region; stacks title and description with consistent spacing.
CardTitleProminent heading text for the card.
CardDescriptionMuted supporting text under the title.
CardContentMain body region for the card’s content.
CardFooterBottom region, typically holding actions such as buttons.

Every part is a div and forwards all standard div props (including className), so you can extend layout and spacing with utility classes.

When to use

  • Grouping a single record’s details (a lien, a work order, a contact) into one bounded surface.
  • Building dashboard panels and settings sections that need a clear visual boundary.
  • Wrapping form sections where a header, fields, and a submit action belong together.

Do not use Card for compact status labeling; reach for the Status Badge instead.