Command Palette

Search for a command to run...

Displays a card with header, content, and footer.

Card
Notifications
You have 3 unread messages.

This is a sample card with header, content, and footer sections.

Notifications
You have 3 unread messages.

This is a sample card with header, content, and footer sections.

import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardAction } from "@/components/optics/card";import { Button } from "@/components/optics/button";import { Bell } from "lucide-react";<div className="flex items-stretch justify-center gap-4">  <Card className="w-[350px]">    <CardHeader>      <CardTitle>        Notifications      </CardTitle>      <CardDescription>        You have 3 unread messages.      </CardDescription>      <CardAction>        <Button          size="icon-sm"          variant="ghost"        >          <Bell />        </Button>      </CardAction>    </CardHeader>    <CardContent>      <p className="text-sm">        This is a sample card with header, content, and footer sections.      </p>    </CardContent>    <CardFooter>      <Button className="w-full">        Mark all as read      </Button>    </CardFooter>  </Card>  <Card    className="w-[350px]"    decorations  >    <CardHeader>      <CardTitle>        Notifications      </CardTitle>      <CardDescription>        You have 3 unread messages.      </CardDescription>      <CardAction>        <Button          size="icon-sm"          variant="ghost"        >          <Bell />        </Button>      </CardAction>    </CardHeader>    <CardContent>      <p className="text-sm">        This is a sample card with header, content, and footer sections.      </p>    </CardContent>    <CardFooter      background      className="justify-end"    >      <Button size="lg">        Mark all as read      </Button>    </CardFooter>  </Card></div>

Installation

pnpm dlx shadcn@latest add @optics/card

Props

<Card />
Name
Type
decorations
boolean(default: false)

<CardFooter />
Name
Type
background
boolean(default: false)