Components
BaseCard
The card every panel is built on: a title row with actions, a padded body or full-bleed content.
Variants
Card title
Card content goes here. Use the body slot for padded content or the default slot for full-bleed content.
Card content goes here. Use the body slot for padded content or the default slot for full-bleed content.
Card title
Card content goes here. Use the body slot for padded content or the default slot for full-bleed content.
Card content goes here. Use the body slot for padded content or the default slot for full-bleed content.
When the #actions slot does not fit next to the title, it moves below it instead of squeezing the title, so a phone never splits a short title over three lines.
Full-bleed content
The default slot renders without padding, for lists, tables and dividers. Use #body for padded content.
Card title
API
Props
Name | Type | Default | Description |
|---|---|---|---|
title | string | — | The title. With description, it renders the title row. |
description | string | — | A sentence under the title. |
title-tag | "h2" | "h3" | "h4" | "div" | "h2" | The element that renders the title. Use h3 or h4 when the card sits under another heading, or div when the title is not a heading. |
Slots
Name | Slot props | Description |
|---|---|---|
#actions | — | At the end of the title row. |
#body | — | Padded content. |
#title | — | Replaces the whole title row. |
#title-append | — | Next to the title, such as a counter chip. |
#header | — | Between the title row and the body. |
#default | — | Content without padding. |
It is always elevation-0 with a thin border and rounded-lg, and fills its column height. Pass height="auto" to size it to its content.