Skip to main content

Card

The Card component is a versatile container used to group related content. It provides built-in support for shadows, borders, backgrounds (including gradients), and standard padding presets.

Usage

Props

string | number
default:"md"
Internal padding. Presets: xs, sm, md, lg, xl, 2xl.
string
default:"lg"
Border radius. Presets: sm, md, lg, xl, 2xl.
string
default:"sm"
Shadow depth: none, sm, md, lg.
string
default:"surface"
Background color. Can be surface, primary, a hex code, or a linear-gradient(...) string.
boolean
default:"true"
Whether to show a border.
boolean
default:"true"
Whether the card takes up 100% width.
string
Size preset that affects padding (sm, md, lg).

Examples

Gradient Background

With Actions

Cards support built-in confirm/cancel button configurations (passed as props) or can contain custom actions in the children.