Card
Card is a grid surface with named slots — media, title, content and action — for one entity with its own
identity: a product, a plan, a post. It paints surface.paper with a hairline border; a string title or
description gets the heading or body typography automatically.
Layout & Surfaces
Use when
- An entity combines media, text and an action, such as a product tile with a photo and a button.
- Items in a list or grid need consistent border, padding and equal-height footers.
- The slot layout must re-arrange with the width of the slot the Card sits in.
Avoid when
- The block has no title or action — use
Paper.
- You need a dialog — use
Modal.
loadingchildren and description render in the same content area, description first; passing both keeps both. Do not
wrap a string title in your own Text.
The media slot is full-bleed: it meets the Card's top and side edges and inherits the corner radius, while the
padding stays on the text slots below.
<Card
width={300}
title="A title here"
media={<Image cover src={cover} />}
actionComponent={<Button fullWidth text="Accept" variant="contained" />}
>
{rating}
</Card>The default template follows the slots present. With an action, the content row takes the leftover space
(auto 1fr auto), so the footer pins to the foot of each tile. interactive adds a hover and focus lift — primary
border, glow, 2px rise — and sets overflow to visible so the glow is not clipped.
Longer
Two lines of copy that make the content row grow while the action stays at the foot.
<Grid medias={{ columns: '1fr 1fr', gap: 'medium' }} height={280}>
<Card height="100%" title="Short" description="One line" actionComponent={<Link href="#" text="Go" />} />
<Card height="100%" interactive title="Longer" description="…" actionComponent={<Link href="#" text="Go" />} />
</Grid>Card takes the same template channels as Grid, with the area names media, title,
content and action. A flat medias replaces the default template; cq re-arranges by the width of the nearest
ancestor with containment; viewportMedias follows the viewport.
<Flex containment="inline-size">
<Card
title="Media beside text from md"
media={<Image cover src="…" alt="…" />}
cq={{ md: { columns: '160px 1fr', rows: 'auto 1fr', areas: '"media title" "media content"' } }}
/>
</Flex>The Card is itself an inline-size container, so slot content can use cq against the Card's width.
- A string
title renders as an <h4>. Pass a node when the page outline needs another level.
- For a tile that navigates, render the Card as a link with
as="a" and href; keep other interactive elements out
of it.
- Give
media images an alt, or an empty alt when they are decorative.
Name
Type
Default
Description
actionComponent
ReactNode
none
Action component (button, button pair, link). Rendered in the `action`
area — the last row of the template, so it pins to the Card's foot when
the Card is taller than its content.
alignContent
"start""end""center""between""around""evenly""stretch"
none
Packing of wrapped lines / grid tracks on the block axis.
as
ElementType<any, keyof IntrinsicElements>
none
Render the container as a different element or component (`styled-components` `as`).
children
ReactNode
none
Main content of the card. Appears below the description.
color
string
none
Theme token (`theme.colors`) used as `color`. Has lower precedence than
`contrast`: when both are provided, the contrast calculation wins.
Stays `string` (not the typed union): `color` is also an HTML attribute
(`<li color>`, etc.) and interfaces extending native props require
identical types on the name collision.
containment
string
none
Containment marker for the `cq` channel: emits
`container-type` (+ `container-name` when the string form carries one,
e.g. `'inline-size card'`). Apply on the immediate wrapper of the
adapting component — NEVER on page-level shells.
cq
Partial<Record<ContainerSizeTypes, Partial<Omit<Partial<{ area: string; padding: stringnumber; margin: stringnumber; isHidden: boolean; truncate: boolean; lineClamp: number; ... 15 more ...; transform: string; }>, "containment"> & Partial<...> & SizeFactoryProps & Partial<...>> & Partial<...> & GridQueryable>>...
none
Container-relative styles per `theme.containerSizes` key: the
full factory surface **and** the grid template (`columns`, `rows`,
`areas`, gaps) — so a Card re-arranges its slot areas by the width of the
slot it sits in, e.g. media beside the text from `md` up:
`cq={{ md: { columns: '160px 1fr', areas: '"media title" "media content"' } }}`.
A container query never measures its own element: the Card's `cq` answers
the nearest size-container **ancestor**; the Card's own containment is
what its slot children's `cq` measure.
description
ReactNode
none
Description/subtitle of the card. Same contract as `title`: a string
becomes `BaseText`, any other `ReactNode` is rendered as-is.
download
none
Anchor `download` hint.
enableBreakpoint
none
Forces a prop set to apply as if the given breakpoint were active,
regardless of the actual viewport size. Useful for stories/storyshots or
controlled previews.
forwardedAs
ElementType<any, keyof IntrinsicElements>
none
Forward the rendered element down a `styled(...)` chain (`styled-components` `forwardedAs`).
href
string
none
Destination when the tile renders as an anchor (`as="a"`).
ignoreResponsive
boolean
none
When `true`, fully disables the responsive factory (useful in tests or
in components that want to show a single fixed snapshot).
interactive
boolean
false
Announce hover: primary border, `level-three` glow and a 2px lift over
the `short` transition (`overflow` becomes `visible` so the glow is not
clipped). For tiles that navigate or open something.
justifyItems
"start""end""center""stretch"
none
Grid containers: inline alignment of every item in its cell.
legibility
"on-photo"
none
Reading-shadow preset for text over a photographic background
(`on-photo`). Replaces the inline `style={{ textShadow }}` in the
consumer (brasil_2030 radar, gap A3). Token emission is deferred until a
2nd consumer asks for the raw var (see backlog).
lineClamp
number
none
Caps the text at this many lines and ends the cut with an ellipsis.
The full string stays in the DOM.
media
ReactNode
none
Media displayed at the top of the card, rendered **full-bleed**: it meets
the Card's top and side edges (and inherits the corner radius), while the
`p` padding applies only to the text slots below it. Typically an
`<Image>` or a video, but any `ReactNode` is accepted.
medias
GridBreakpoints
none
Base grid template — `columns`, `rows`, `areas`, the gaps and the
alignment keys, applied at every width (the mobile-first base). Wider
contexts opt in on `cq` (slot width) or `viewportMedias` (viewport width).
The breakpoint-keyed form (`{ xs: …, md: … }`) is **deprecated**
({@link GridBreakpointMedias}): it still renders, warns once in
development, and is removed in the next major.
@example ```tsx
<Grid medias={{ columns: '1fr', areas: '"a" "b"' }} viewportMedias={{ md: { columns: '1fr 2fr', areas: '"a b"' } }} />
```
motion
"none""fade""scale""slide-up""slide-down""slide-left""slide-right""collapse""sheet""sheet-top""drawer-left""drawer-right""push-left""push-right"
none
Semantic motion preset. Enter animates on mount via
`@starting-style`; exit expects the `data-state="closing"` attribute
(see `useExitTransition`). Durations/easings resolve from the
`--apollion-motion-*` vars with the theme literal as fallback, so
`prefers-reduced-motion` zeroes them centrally.
@example ```tsx
<Flex motion="slide-up">Toast body</Flex>
<Flex motion="push-left">Editor page</Flex>
```
pageShell
boolean
none
Centers the element and caps the width at `theme.layout.pageMaxWidth`.
The page shell of a classic centered layout.
placeItems
"start""end""center""stretch"
none
Grid containers: `place-items` shorthand (block + inline).
readable
none
Makes the `color` legible against the page surface: `true` = WCAG AA
(4.5), a number sets a custom floor. Ignored with `contrast`.
See the Layout Props concept page for the full semantics.
rel
string
none
Anchor `rel` (e.g. `noopener noreferrer` for `target="_blank"`).
subtitle
ReactNode
none
Additional slot rendered in the `content` area between `description` and `children`.
target
HTMLAttributeAnchorTarget
none
Anchor target (`_blank`, `_self`, …).
title
ReactNode
none
Main title of the card. When a string, it is rendered in `BaseText`
with heading typography; when a `ReactNode`, it is used as-is — useful
for including icons, avatars, or custom hierarchy.
transform
string
none
CSS `transform` value (e.g. `translate(-50%, -33px)`). Never leaks
to the DOM as an attribute.
viewportMedias
Partial<Record<keyof BreakPoint<any>, Partial<Omit<Partial<{ area: string; padding: stringnumber; margin: stringnumber; isHidden: boolean; truncate: boolean; lineClamp: number; pageShell: boolean; ... 14 more ...; transform: string; }>, "containment"> & Partial<...> & SizeFactoryProps & Partial<...>> & Partial...
none
Viewport-driven styles per `theme.breakpoints` key: the full factory
surface **and** the grid template — the viewport sibling of `cq`, for a
Card whose slot layout follows the screen rather than its slot. Needs no
`containment` ancestor. Prefer `cq` when the Card can sit at more than one
width on the same screen.
Every layout prop also applies and is not repeated here.