Card

A container component for grouping related content with optional header, footer, and actions.

Card Title
Card description goes here.

This is the card content area. Place your main content here.

Installation

pnpm dlx stera-ui add card

Usage

import {
  Card,
  CardHeader,
  CardTitle,
  CardDescription,
  CardContent,
  CardFooter,
} from "@/components/ui/card"
<Card>
  <CardHeader>
    <CardTitle>Card Title</CardTitle>
    <CardDescription>Card description goes here.</CardDescription>
  </CardHeader>
  <CardContent>
    <p>Card content</p>
  </CardContent>
</Card>

With Action

Notifications
You have 3 unread messages.
3

Manage your notification preferences and stay up to date with the latest activity.

Sizes

Default size
Standard spacing and text sizes.

Card content with default padding.

Small size
Reduced spacing and text sizes.

Card content with smaller padding.

SizeDescription
defaultStandard padding
smReduced padding

API Reference

Card

PropTypeDefault
size"default" | "sm""default"

Subcomponents

ComponentDescription
CardHeaderTop section containing title, description, and optional action
CardTitleHeading text for the card
CardDescriptionSupporting text below the title
CardActionRight-aligned slot in the header for buttons or controls
CardContentMain body content area
CardFooterBottom section of the card