Card

A macOS box: a rounded panel with a hairline edge, a header, content and a footer.

@cupertinoui/cardRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/card

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

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

<Card>
  <CardHeader>
    <CardTitle>iCloud+</CardTitle>
    <CardDescription>200 GB plan</CardDescription>
  </CardHeader>
  <CardContent>…</CardContent>
</Card>

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

Card

PropTypeDescription
size"default" | "sm"
Default: "default"
16 or 12pt of padding.
classNamestringExtra classes, merged with the component's own.

CardHeader / CardTitle / CardDescription / CardAction / CardContent / CardFooter

PropTypeDescription
classNamestringExtra classes, merged with the component's own.