A flexible container for grouping related content and actions.

Create project
Deploy your new project in one-click.

Fill in your project details to get started with deployment.

Installation

npx shadcn@latest add @ark-cn/card

Usage

import {
  Card,
  CardHeader,
  CardFooter,
  CardTitle,
  CardAction,
  CardDescription,
  CardContent,
} from "@/components/ui/card"
<Card>
  <CardHeader>
    <CardTitle>Title</CardTitle>
    <CardDescription>Description</CardDescription>
  </CardHeader>
  <CardContent>Content goes here.</CardContent>
  <CardFooter>Footer</CardFooter>
</Card>

Examples

Default

Create project
Deploy your new project in one-click.

Fill in your project details to get started with deployment.

Simple

Notifications
You have 3 unread messages.

Check your inbox to see the latest updates from your team.

With Action

Team Members
Manage your team and permissions.

You currently have 4 team members with access to this project.

Small

Quick Note
Compact card variant.

Use the sm size for denser layouts.

API Reference

This component is an ark-cn composition. All parts render as ark.div elements.

Card

PropTypeDefaultDescription
size"default" | "sm""default"Controls spacing density across all child parts via group-data-[size=sm].
classNamestringAdditional class names merged via cn().

CardHeader

Grid container for title, description, and optional action. Adjusts column layout automatically when CardAction is present.

CardTitle

Heading text. Scales with the size prop inherited from Card.

CardDescription

Muted secondary text below the title.

CardAction

Pinned to the top-right of the header grid. Spans two rows to align with both title and description.

CardContent

Main body area. Horizontal padding matches the card size.

CardFooter

Muted bottom bar with a top border. Padding matches the card size.