Integrated ResearchPicasso
Components

Card

A surface that holds one thing, and says so with a border and a little lift.

{/* Generated by scripts/build-component-docs.mjs — do not edit. The source is the component folder: guidance.json, the doc block and the props. Change those. */}

A surface that holds one thing, and says so with a border and a little lift.

Import

import { Card, CardHeader, CardTitle, CardDescription, CardHeaderText, CardAction, CardContent, CardFooter } from "@ir/ui";

Props

PropTypeRequiredWhat it does
sizeSizeFigma's Size: default pads at 24, sm at 16.

Do and don't

Give each its own card, or drop the card and use headings.

Don't — Put three unrelated sections in one card because they share a screen.

The border is a claim that everything inside belongs together. Used on a grab bag it stops meaning anything, and the page reads as boxes rather than content.

Use a divider, a heading, or a plain bordered region inside.

Don't — Nest a card inside a card.

Two borders and two shadows say "unit" twice about the same content, and the inner one competes with the outer for the eye.

Let the page be the page; use cards for the things on it.

Don't — Wrap the whole page body in a card.

A card that contains everything separates nothing. The lift is a comparison — it only reads against an unlifted surface.

Title the card only when the content needs naming.

Don't — Repeat the section heading as the card title.

A card is allowed to be just content. A title that echoes the heading above it costs a line and adds nothing.

Don't — Scatter actions through the card — one in the header, two in the body, one in the footer.

Two places is a pattern people can learn. Four is a search.

Pair it with an outline.

Don't — Pair a card's primary action with a secondary button.

Secondary's fill is bg/app — the page background. Inside a card it reads as a hole punched through to the page behind, and it only looks like a filled button at all because the card under it is white. Outline is what it is already pretending to be, with a border that belongs to the card rather than a fill that belongs to the page. A dialog has room for a secondary; a card does not, and the Figma page agrees — twelve primary and three outline in card footers, and no secondary in any of them.

Either the card is the target, or it holds targets — not both.

Don't — Make the whole card a link and put buttons inside it.

A click inside a clickable card is ambiguous to the person and genuinely ambiguous in the markup; nested interactive elements are also invalid for assistive technology.

Use sm where cards repeat — a list, a grid, a sidebar — and default where one card carries a page.

Don't — Use sm to fit more words into the same space.

The size changes padding, not type. Shrinking the padding to win room makes the content feel crowded rather than compact.

Accessibility

  • Every part of Card is a <div>, CardTitle included. A card that is a section of the page needs a real heading inside CardTitle, or the page outline skips straight past it.
  • Card has no role. If it is meant to be a landmark, the consumer adds role="region" and aria-labelledby pointing at its title.

Where it is drawn

Figma — structure from figma, measurements from figma.

Open in Storybook

On this page