Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Card

Displays a card with header, content, and footer.

Login to your account
Enter your email below to login.

Installation

npx logic2b@latest add card

Usage

import {
  Card,
  CardAction,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"

<Card>
  <CardHeader>
    <CardTitle>Title</CardTitle>
    <CardDescription>Description</CardDescription>
    <CardAction>{/* e.g. a button, top-right */}</CardAction>
  </CardHeader>
  <CardContent>Content</CardContent>
  <CardFooter>Footer</CardFooter>
</Card>

API

Card is composed of layout primitives — Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, and CardFooter. Each is a styled div that accepts className plus the standard div props; there are no variant props. CardAction is positioned in the top-right of the header, and CardHeader switches to a two-column grid when a CardAction is present.

Examples

With action

Place a control such as a badge or button in the header via CardAction.

Total revenue
$45,231.89
+12.5%

Trending up compared to last month.

Notification

Combine header, content, and footer for a self-contained panel.

Notifications
You have 3 unread messages.

Your build is ready

2 minutes ago