Component
Card

Card

Displays a card with header, content, and footer.

Create project

Deploy your new project in one-click.

Installation

Copy and paste the following code into your project

components/ui/card/index.tsx
import { styled } from '@shadow-panda/styled-system/jsx'
import {
  card,
  cardHeader,
  cardTitle,
  cardDescription,
  cardContent,
  cardFooter,
} from '@shadow-panda/styled-system/recipes'
 
export const Card = styled('div', card)
export const CardHeader = styled('div', cardHeader)
export const CardTitle = styled('h3', cardTitle)
export const CardDescription = styled('p', cardDescription)
export const CardContent = styled('div', cardContent)
export const CardFooter = styled('div', cardFooter)

Update the import paths to match your project setup

Usage

import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from '@/components/ui/card'
<Card>
  <CardHeader>
    <CardTitle>Card Title</CardTitle>
    <CardDescription>Card Description</CardDescription>
  </CardHeader>
  <CardContent>
    <p>Card Content</p>
  </CardContent>
  <CardFooter>
    <p>Card Footer</p>
  </CardFooter>
</Card>

Examples

Notifications

You have 3 unread messages.

Push Notifications

Send notifications to device.

Your call has been confirmed.

1 hour ago

You have a new message!

1 hour ago

Your subscription is expiring soon!

2 hours ago