Skip to main content

Overview

Team overview
Summary of active members.
12 members active this week.
Flat card
Subtle container without elevation.
+12.5%
Total Revenue
$48,295
Card is a versatile surface container. It comes in several variants: default (border + shadow), flat (no shadow), hoverable (interactive), stat (KPI display), and media (image header).

Installation


Usage


Variants

Default Card

The standard card with a 1px border, light shadow, and 12px border radius.
Team overview
Summary of your active team members.
12 members active this week.

Flat Card

No shadow — use inside panels or sections that already have a container.
Flat card
Simple content in a flat, no-shadow container.

Hoverable (Clickable) Card

Adds a hover transition and cursor pointer — use for navigable cards.
Project Alpha
Due March 31
65% complete

Stat Card

Optimized layout for KPI metrics with trend indicators.
+12.5%
Total Revenue
$48,295
−3.1%
Active Users
3,842

With Media

Attach an image or visual header above the card content.
Project name
Description of the project goes here.

API Reference

Card

string
default:"default"
Visual style. Values: default · flat · hover
() => void
Makes the card interactive. Automatically applies hover cursor and focus ring.
string
Additional class names for the card container.

CardFooter

string
default:"start"
Footer content alignment. Values: start · end · between

CardStat

string
required
The metric label text (e.g. “Total Revenue”).
string | number
required
Primary metric value displayed prominently.
string
Trend direction for color coding. Values: positive · negative · neutral
number
Percentage change value (e.g. 12.5 renders as +12.5%).
ReactNode
Icon displayed in the stat card header area.

Accessibility

  • Hoverable cards rendered with onClick should include a focusable element or use role="button" with tabIndex={0} and keyboard handler
  • CardTitle renders as <h3> by default — adjust heading level with the as prop to maintain document heading hierarchy
  • Media images inside cards must have descriptive alt text
  • Avoid putting interactive elements inside a card that is itself clickable — this creates nested interactivity issues

Do’s & Don’ts

Do

  • Use CardStat for KPI displays — it provides consistent metric layout
  • Use variant="hover" only for cards that are genuinely navigable or clickable
  • Keep card content focused on a single topic or entity
  • Use CardFooter align="between" when you need both a label and an action button

Don't

  • Don’t nest a clickable card inside another clickable card
  • Don’t use Card as a modal replacement — use Modal or Sheet instead
  • Don’t use variant="hover" on non-interactive cards — it creates false affordance
  • Don’t overload a card with too many actions — limit to 1–2 per card