CCard
CCard is a card component with a fixed structure. It consists of four independent components — CCard, CCardHeader, CCardBody, CCardFooter — each of which can be used on its own.
Basic usage
vue
<c-card>
<c-card-header>Title</c-card-header>
<c-card-body>Main card content</c-card-body>
<c-card-footer>Footer</c-card-footer>
</c-card>Components
Component
Class
Description
CCard.c-cardRoot card container
CCardHeader.c-card-headerCard header
CCardBody.c-card-bodyMain content area
CCardFooter.c-card-footerCard footer
Props
All four components accept the same props:
Prop
Type
Default
Description
tagstring'div'HTML tag of the root element
Slots
Slot
Description
defaultArbitrary content
CSS variables
Variable
Default
Description
--c-card-width100%Card width
--c-card-border-radiusvar(--c-sys-shape-lg)Border radius
--c-card-header-paddingvar(--c-sys-space-5)Header padding
--c-card-body-paddingvar(--c-sys-space-4)Body padding
--c-card-footer-paddingvar(--c-sys-space-4)Footer padding
--c-card-background-colorvar(--c-sys-color-surface-container-low)Background color
--c-card-header-background-colorvar(--c-sys-color-surface-container)Header background color
--c-card-footer-background-colorvar(--c-sys-color-surface-container-lowest)Footer background color
--c-card-text-colorvar(--c-sys-color-on-surface)Text color
--c-card-muted-text-colorvar(--c-sys-color-on-surface-variant)Header/footer text color
--c-card-border-colorvar(--c-sys-color-outline)Border color
--c-card-border-widthvar(--c-sys-border-width-thin)Border width
--c-card-elevationvar(--c-sys-elevation-1)Box shadow
Variables can be overridden via CSS or inline styles:
vue
<c-card style="--c-card-border-radius: 16px; --c-card-background-color: #f5f7fa">
...
</c-card>