‹ components

Card

draftv0.9.0·open in canvas

The generic container primitive — outlined surface, card radius, base padding.

Installnpx shadcn add @cids/card
Live demo

Portfolio

3 positions · $12,480

Interactive card

hover lifts · press scales 0.98

Motion · tap to replay

honors reduced-motion

150ms on `background-color` + `transform` only (no `transition-all`), and only when `interactive`. Static cards are motionless.

Brand chip remounts on tap · highlighted tokens are named in this component's doc · spring is budgeted to human feedback only.

import { Card } from "@/design-system";

<Card>
  <h3 className="text-sm font-medium">Portfolio</h3>
  <p className="text-xs text-fg-muted">3 positions · $12,480</p>
</Card>

<Card interactive onClick={open}>…</Card>

Tokens · live

Resolves in the active theme — flip the toggle above to verify.

States · from doc

Parsed from the doc. Interact with the live demo for hover/active.

pressscales to 0.98 .

The generic container primitive — outlined surface, card radius, base padding.

Anatomy

┌───────────────────────────┐  ← border-outline-variant,
│  p-4 padding              │    rounded-card, bg-surface-container
│  (children — caller owns  │
│   the internal layout)    │
└───────────────────────────┘

Props

PropTypeDefaultNotes
interactivebooleanfalseHover surface lift + scale(0.98) press. Set on clickable cards only.
classNamestring—cn-merged; override padding with p-* when needed.
…restHTMLAttributes<HTMLDivElement>—onClick, role, etc. pass through.

Motion

150ms on background-color + transform only (no transition-all),

and only when interactive. Static cards are motionless.

A11y

Renders a plain div — semantics come from the caller. If the whole

card is clickable, prefer wrapping it in a link/button or pass

role="button" + tabIndex={0} + key handlers; don't leave a bare

onClick on a div for keyboard users. Interactive cards must contain a

visible affordance (the hover lift alone is not discoverable).

Self-contained: copy the folder into any Tailwind+React app, or use the install command above. Docs and this page render the same file on disk — they cannot drift.