layoutcss

Card

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

CSS Variables

VariableDefaultScopeDescription
--z-card-adjacent-padding0.z-cardTop padding of a body that follows a header, or a footer that follows a body.
--z-card-bgvar(--z-card).z-cardSurface background color.
--z-card-bg-o100%.z-cardOpacity applied to the surface background color.
--z-card-border-colorvar(--z-border).z-cardBorder color.
--z-card-border-color-ovar(--z-border-o).z-cardOpacity applied to the border color.
--z-card-border-width1px.z-cardBorder width.
--z-card-colorvar(--z-card-f).z-cardText color.
--z-card-color-o100%.z-cardOpacity applied to the text color.
--z-card-header-footer-padding0.z-cardTop padding of a footer that follows a header.
--z-card-padding1rem.z-cardPadding of the header, body, and footer regions.
--z-card-radiusvar(--z-global-radius).z-cardCorner radius.
--z-card-shadowvar(--z-global-shadow).z-cardBox shadow.
--z-card-title-font-size1.125rem.z-card-titleFont size of the card title.
--z-card-title-height1.z-card-titleLine height of the card title.
--z-card-title-tracking-0.025em.z-card-titleLetter spacing of the card title.
--z-card-title-weight600.z-card-titleFont weight of the card title.

CSS Classes

ClassRoleApplies toDescription
.z-cardroot.z-cardContainer surface with border, radius, and shadow.
.z-card-bodyelement.z-cardMain content region with padding.
.z-card-dangermodifier.z-cardDanger color scheme with white text.
.z-card-footerelement.z-cardBottom region for actions or metadata.
.z-card-headerelement.z-cardTop region, typically holding the title.
.z-card-infomodifier.z-cardInfo color scheme with white text.
.z-card-mutedmodifier.z-cardMuted color scheme with a faint tinted background.
.z-card-primarymodifier.z-cardPrimary color scheme.
.z-card-secondarymodifier.z-cardSecondary color scheme with a faint tinted background.
.z-card-successmodifier.z-cardSuccess color scheme with white text.
.z-card-titleelement.z-cardCard heading typography.
.z-card-warningmodifier.z-cardWarning color scheme with white text.