Skip to Content

Card

An elevated surface container with an optional header, main content area, and optional footer. Maps to a VisualElement with a SurfaceColor background, rounded corners, and a subtle ambient shadow.

Constructor

Card

Creates a Card element.

ParameterDescription
contentThe main body content. Required.
headerOptional header element shown above the content.
footerOptional footer element shown below the content.
outlinedWhen true, renders as a flat outlined card without shadow.
keyAn optional key for reconciliation identity.

Properties

Content

The main content of the card body.

Optional element rendered below the content area, separated by a divider. When null, no footer or divider is shown.

Optional element rendered above the content area, separated by a divider. When null, no header or divider is shown.

Outlined

When true, the card has no shadow and uses a border instead of elevation. Useful for flat/outlined card variants.

Last updated on