Duolith docs

Card

A raised surface that groups related content, with an optional title, media and press.

Stability: experimental

Props

PropTypeDefaultMeans
titlestringA heading at the top.
subtitlestringA caption under the title.
flatbooleanfalseA border instead of a shadow.
onPress() => voidMakes the whole card one button.

Pieces

PieceMeans
mediaFull-bleed content above the title, such as an image.

Children

The card's content, under the title.

States

StateLooks like
pressedA pressable card scales to 98.5%.
focusedA pressable card shows the focus outline.

Accessibility

rolenone (a group of content); button when onPress is given
nameA pressable card is named by its content.
focusOnly 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>