Skip to content

Card

Layout

Container with header, content, and footer slots. Used for stats, forms, and data panels.

Header, content and footerInteractive action
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Compose CardHeader, CardTitle, CardDescription, CardContent, and CardFooter. Use cards to group one related set of information and its actions.

Import
import {
  Card,
  CardHeader,
  CardTitle,
  CardDescription,
  CardContent,
  CardFooter,
} from "@dashboardpack/core/components/ui/card";

Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.

API reference

Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.

Card props
PropType / DefaultDescription
classNamestring

Default: —

Extend styles on any card slot.
childrenReactNode

Default: —

Compose the header, content, and footer slots.

Build with these too