Components/Layout/Card
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/card
Cards are containers that group related content and actions.
<CardGalleryItem/>.Card layouts can vary, but they can include up to four related components:
<Card.Header/><SectionHeader/><Card.Content/><Card.Divider/>The <Card.Header/> communicates what the card is about. It can include three elements:
titlesubtitlesuffixThe suffix can be a button or toggle component.
The <SectionHeader/> divides card content into scannable sections. It can include two elements:
titlesuffixFind more information in <SectionHeader/> story.
Cards can support any type of content. For example, text, radio buttons, and tables all can be used in cards as child components.
Dividers separate different content sections within cards.
When there's no <SectionHeader/>, use a divider to separate the header from other content.
Add the <CloseButton/> (with a default or a help icon) to cards using the controls prop.
Clip card content into specific card dimensions with the hideOverflow prop.
Apply this property when a card contains overflowing components inside, like a scrollable table.
To make cards expand vertically to fit more content, use the stretchVertically prop.
To highlight a card with no header or subheader, use the showShadow prop. This is most commonly used in widgets. Note that in the Harmony and Studio 2.0 themes, the shadow is always shown regardless of the showShadow value.
Use a card to group related form elements into a single layout.
Collapse and expand card content with the collapse mechanism.
The <ToggleSwitch/>, <IconButton/> and <TextButton/> components can trigger collapse and expand actions.
Cards can be used as widgets within grids or custom layouts. To highlight one card, use the showShadow property.
These cards usually don't include headers or section headers.
<MarketingLayout/> should always be wrapped inside a card.
If there's no content to display, add an <EmptyState/> component to guide users forward.
| Name | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Contains elements inside the card such as <Card.Header/>, <Card.Subeader/>, <Card.Content/> or <Card.Divider/>. |
controls | ReactNode | — | Contains elements that control the component, usually a <CloseButton/>. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in tests. |
hideOverflow | boolean | — | Defines whether to hide portions of card content that overflows its dimensions. |
highlight | "focus" | — | Applies a highlighting effect on the borders of the component. |
showShadow | boolean | — | Defines whether to apply a drop shadow effect. |
stretchVertically | boolean | — | Makes a card stretch vertically to max height in a layout or container. |
No testkit for this component — it doesn't expose a unidriver testkit.
<Collapse/>, a Card.Content with size="none", or no content at all — keeps its bottom padding instead of sitting flush against whatever follows, and the gap between Card.Header and its content is back to the intended size in Harmony (odeditor) and Studio 2.0 (odeditor-dark). A Card.Header placed directly above a Card.Subheader gains that gap too, where it previously had almost none. (#16991) — has visual changescard.controls-padding-vertical and card.controls-padding-horizontal tokens. In the odeditor theme the controls sit 12px from the top and right edges; other themes keep their current position. (#16772) — has visual changesLast updated: 22 October 2026