Card
A container that groups related content and actions.
- Status
- ReadyBuild day 8 of 21
- Code
- In React
- Role
- Display
Usage
This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.
Time Savings
4% p.a. interest on regular deposits.
Pastes as editable layers. Shadows are not exported.
import { Button, Card } from "@/ui";
export default function CardDemo() {
return (
<Card
type="action"
label="Promo"
title="Time Savings"
description="4% p.a. interest on regular deposits."
actions={
<>
<Button variant="ghost">Skip</Button>
<Button>Apply</Button>
</>
}
/>
);
}Variants and states
Every specimen is the real component from src/ui, held in one state.
Subsidized Home
Installments from Rp1.2M/month over a 20-year term.
Subsidized Home
Installments from Rp1.2M/month over a 20-year term.
Subsidized Home
Installments from Rp1.2M/month over a 20-year term.
Subsidized Home
Installments from Rp1.2M/month over a 20-year term.
Subsidized Home
Installments from Rp1.2M/month over a 20-year term.
Subsidized Home
Installments from Rp1.2M/month over a 20-year term.
Pastes as editable layers. Shadows are not exported.
Props
- title
- string · default none
- Required.
- description
- string · default none
- Body text.
- label
- string · default none
- A small tag above the title.
- type
- "basic" | "media" | "action" · default "basic"
- Media adds a 16:9 image. Action adds a footer for buttons.
- image
- ReactNode · default none
- Media only. An image element. Leave out for the placeholder.
- linkLabel, href
- string · default none
- Media only. The link under the description.
- actions
- ReactNode · default none
- Action only. Footer buttons.
- interactive
- boolean · default false
- Hover shadow and pressed fill, for a card that is itself pressable.
- disabled
- boolean · default false
- 50% opacity.
- stroke
- boolean · default true
- The border.
Figma to code
Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.
- 🧰 Type
- type
- basic, media, or action.
- 🎯 State
- interactive, disabled
- Hover and Pressed are the interactive prop. Disabled is disabled.
- Stroke
- stroke
- Boolean.
- Show Image, Show Label, Show Description, Show Button
- image, label, description, actions
- Pass or leave out.
Accessibility
What the code in src/ui does today, and what it leaves to you.
Keyboard
- The card is not focusable. Its link and buttons are.
Screen readers
- An article with the title as a heading. A disabled card has aria-disabled.
What you still need to do
- If the whole card is a link, put the link on the title and stretch it, so there is one link per card.
- Do not nest interactive elements inside an interactive card.
When to use
One card per record the user can act on, such as a bill or a transfer.
Do and don't
Do
- Keep consistent padding and radius across cards.
- Use a clear hierarchy inside: title, body, action.
Don't
- Nest cards inside cards.
- Overload a single card with unrelated content.
Related
4 of 28 other molecules, same role and ready ones first.
- AccordionStacked sections that expand to reveal their content.Ready
- DividerA thin line used to separate content into distinct sections.Ready
- Empty StateCommunicates that there is no content to show, with a next step.Ready
- QR Code DisplayA scannable code with its amount, recipient, and expiry.Ready
Status reflects the component tracker snapshot of 29 October 2026.