layoutcss
Card
Content container with header, body, and footer regions and seven color schemes.
CSS Variables
| Variable | Default | Scope | Description |
|---|---|---|---|
--z-card-adjacent-padding | 0 | .z-card | Top padding of a body that follows a header, or a footer that follows a body. |
--z-card-bg | var(--z-card) | .z-card | Surface background color. |
--z-card-bg-o | 100% | .z-card | Opacity applied to the surface background color. |
--z-card-border-color | var(--z-border) | .z-card | Border color. |
--z-card-border-color-o | var(--z-border-o) | .z-card | Opacity applied to the border color. |
--z-card-border-width | 1px | .z-card | Border width. |
--z-card-color | var(--z-card-f) | .z-card | Text color. |
--z-card-color-o | 100% | .z-card | Opacity applied to the text color. |
--z-card-header-footer-padding | 0 | .z-card | Top padding of a footer that follows a header. |
--z-card-padding | 1rem | .z-card | Padding of the header, body, and footer regions. |
--z-card-radius | var(--z-global-radius) | .z-card | Corner radius. |
--z-card-shadow | var(--z-global-shadow) | .z-card | Box shadow. |
--z-card-title-font-size | 1.125rem | .z-card-title | Font size of the card title. |
--z-card-title-height | 1 | .z-card-title | Line height of the card title. |
--z-card-title-tracking | -0.025em | .z-card-title | Letter spacing of the card title. |
--z-card-title-weight | 600 | .z-card-title | 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. |