Card.Content

Components/Layout/Card

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/card-content

Overview

Copy

The card content is a container that stores the content of a card. The content should be relevant to the card's header. It's a compound component of the <Card/>.

Do

  • Place elements like text and images in a way that clearly indicates hierarchy.
  • Use dividers to separate content into clear groups.

Don't

  • Don't repeat the content in the <Card.Header/> or the <SectionHeader/>.
  • Don't use it outside of the <Card/> component.

Feature examples

Size

The padding area on all 4 sides of the component is controlled by the size prop:

  • For most cases, use the default medium. It will add a 24 px padding on all sides.
  • To add extra padding, use large. It will add a 36 px padding on all sides.
  • Use none to remove the padding entirely, for content that manages its own insets or has to reach the card's edges, a table, a full-width image or a nested layout.

A Card.Header above a none content keeps its own bottom padding, so the header does not sit flush against the content beneath it.

Copy

Common use case examples

Structured content

Add a <Card.Divider/> to separate content elements into clear groups.

Copy

Empty state

When there is no data to display in the card's content, use the <EmptyState/> component instead.

Copy

Code

Copy

Props

NameTypeDefaultDescription
childrenReactNode—Accepts any component as a child element to display inside the card content area.
dataHookstring—Applies a data-hook HTML attribute to be used in the tests.
size"medium" | "large" | "none"'medium'Controls paddings of the content area.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getSize—
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.176.2 (2025-04-03) — fix: update getChildName (#14713)
  • 1.176.1 (2025-04-02) — fix: regression (#14699)
  • 1.147.0 (2024-12-13) — feat: add none size option (#14388)

Last updated: 20 October 2026

Did this help?