Components
Card
A titled container with media, status, meta and optional expandable details.
pnpm dlx shadcn@latest add @caliper/card
Booking flow and the six room pages.
Mara Chen
Updated today
When to use
Use it for
- Projects, listings and items in a grid.
- Content that links to a larger page.
Skip it when
- Wrapping content that has no boundary; use plain layout.
Installation
pnpm dlx shadcn@latest add @caliper/card
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
This is the code behind the preview above.
import { AvatarGroup } from "@/components/ui/avatar-group" import { Badge } from "@/components/ui/badge" import { Card } from "@/components/ui/card" export function ProjectCard() { // eslint-disable-next-line @next/next/no-img-element const cover = <img src="/media/harbour.jpg" alt="" className="size-full object-cover" />; return ( <div className="w-full max-w-sm"> <Card title="Harbour redesign" description="Booking flow and the six room pages." media={cover} meta="Mara Chen" status="Updated today" action={<Badge tone="violet">Design</Badge>} details={<p className="text-sm">Milestones: copy freeze 24 Oct, build review 30 Oct, launch 4 Nov. Open question: do late arrivals get the door code by text?</p>} > <AvatarGroup label="Project team" max={3} members={[{ name: "Mara Chen" }, { name: "Noor Haddad" }, { name: "Ivo Petrov" }, { name: "Sana Okafor" }]} /> </Card> </div> ); }
API reference
Card
component
Accessibility
It exposes status semantics. Changes that matter are announced through a live region.
Keyboard and focus handling comes from Radix dialog: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.