Card
A raised surface that groups related content, with an optional title, media and press.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
title | string | A heading at the top. | |
subtitle | string | A caption under the title. | |
flat | boolean | false | A border instead of a shadow. |
onPress | () => void | Makes the whole card one button. |
Pieces
| Piece | Means |
|---|---|
media | Full-bleed content above the title, such as an image. |
Children
The card's content, under the title.
States
| State | Looks like |
|---|---|
pressed | A pressable card scales to 98.5%. |
focused | A pressable card shows the focus outline. |
Accessibility
| role | none (a group of content); button when onPress is given |
| name | A pressable card is named by its content. |
| focus | Only a pressable card takes focus. |
Theme tokens
color.surface color.border color.ink color.muted shadow.md space.3 space.4 radius.lg text.heading text.caption
Example
<Card title="Plan" subtitle="Monthly"><text>£4 a month</text></Card>