Layout
Card
A surface container on bg-page with border, radius-lg and shadow-sm.
- Provide
title(title-4look) and optionalsubtitle,actions(top-right) andfooter(actions bottom-right). padding="compact"(12px) for dense grids and items inside panels; default padding is 16px.flatdrops the shadow when cards sit inside another surface (for example a board column).- Don't nest a shadowed card inside another card.
When to use
Group related content on a page into a bordered surface with an optional title and actions.
Use something else
Whole-page sections → PageHeader + plain layout. Clickable record in a board → KanbanCard.
Do
- Use
padding="compact"for dense grids;flatinside another surface.
Don't
- Don't nest shadowed cards.
- Don't make the whole card clickable and also put buttons in it.
Props
| Prop | Type |
|---|---|
title | React.ReactNode |
subtitle | React.ReactNode |
actions | React.ReactNode |
footer | React.ReactNode |
padding | 'default' | 'compact' |
flat | boolean |
interactive | boolean |
as | string |
children | React.ReactNode |
Use
const { Card } = window.Tessera;
const el = React.createElement(Card, { /* props */ });