# Card (`.z-card`)

> Content container with header, body, and footer regions and seven color schemes.

- **Kind:** css
- **Category:** layout

## CSS Variables

| Variable | Default | Scope | Affects | Description |
| --- | --- | --- | --- | --- |
| `--z-card-adjacent-padding` | `0` | `.z-card` | `padding-block-start` | Top padding of a body that follows a header, or a footer that follows a body. |
| `--z-card-bg` | `var(--z-card)` | `.z-card` | `background-color` | Surface background color. |
| `--z-card-bg-o` | `100%` | `.z-card` | `background-color` | Opacity applied to the surface background color. |
| `--z-card-border-color` | `var(--z-border)` | `.z-card` | `border` | Border color. |
| `--z-card-border-color-o` | `var(--z-border-o)` | `.z-card` | `border` | Opacity applied to the border color. |
| `--z-card-border-width` | `1px` | `.z-card` | `border` | Border width. |
| `--z-card-color` | `var(--z-card-f)` | `.z-card` | `color` | Text color. |
| `--z-card-color-o` | `100%` | `.z-card` | `color` | Opacity applied to the text color. |
| `--z-card-header-footer-padding` | `0` | `.z-card` | `padding-block-start` | Top padding of a footer that follows a header. |
| `--z-card-padding` | `1rem` | `.z-card` | `padding` | Padding of the header, body, and footer regions. |
| `--z-card-radius` | `var(--z-global-radius)` | `.z-card` | `border-radius` | Corner radius. |
| `--z-card-shadow` | `var(--z-global-shadow)` | `.z-card` | `box-shadow` | Box shadow. |
| `--z-card-title-font-size` | `1.125rem` | `.z-card-title` | `font-size` | Font size of the card title. |
| `--z-card-title-height` | `1` | `.z-card-title` | `line-height` | Line height of the card title. |
| `--z-card-title-tracking` | `-0.025em` | `.z-card-title` | `letter-spacing` | Letter spacing of the card title. |
| `--z-card-title-weight` | `600` | `.z-card-title` | `font-weight` | Font weight of the card title. |

## CSS Classes

| Class | Role | Applies to | Description |
| --- | --- | --- | --- |
| `.z-card` | `root` | `.z-card` | Container surface with border, radius, and shadow. |
| `.z-card-body` | `element` | `.z-card` | Main content region with padding. |
| `.z-card-danger` | `modifier` | `.z-card` | Danger color scheme with white text. |
| `.z-card-footer` | `element` | `.z-card` | Bottom region for actions or metadata. |
| `.z-card-header` | `element` | `.z-card` | Top region, typically holding the title. |
| `.z-card-info` | `modifier` | `.z-card` | Info color scheme with white text. |
| `.z-card-muted` | `modifier` | `.z-card` | Muted color scheme with a faint tinted background. |
| `.z-card-primary` | `modifier` | `.z-card` | Primary color scheme. |
| `.z-card-secondary` | `modifier` | `.z-card` | Secondary color scheme with a faint tinted background. |
| `.z-card-success` | `modifier` | `.z-card` | Success color scheme with white text. |
| `.z-card-title` | `element` | `.z-card` | Card heading typography. |
| `.z-card-warning` | `modifier` | `.z-card` | Warning color scheme with white text. |

## Notes

- The last child of each region loses its bottom margin so regions sit flush.

## Guides

- [Styling with cls and stl](https://next.0build.dev/docs/guides/styling.md)
- [Translating Components](https://next.0build.dev/docs/guides/i18n.md)
- [Icon Resolution](https://next.0build.dev/docs/guides/icons.md)
- [The data-source Convention](https://next.0build.dev/docs/guides/data-source.md)
- [Openers & Triggers](https://next.0build.dev/docs/guides/triggers.md)
- [Dialog Behavior](https://next.0build.dev/docs/guides/dialogs.md)
- [Utilities](https://next.0build.dev/docs/guides/utilities.md)
- [Runtime](https://next.0build.dev/docs/guides/runtime.md)
