Card
A padded surface with a shadow. The classless build styles every
article this way; .card in 1.x meant the bordered
variant, which is now .card-border.
| Class | Does what |
|---|---|
card | Padded, raised surface with a shadow |
card-border | Flat surface with a border instead of a shadow |
card-actions | Footer row: top border, right-aligned actions |
Basic
<article class="card prose">
<h3>Card heading</h3>
<p>Cards hold a block of related content.</p>
</article>
<article>
<h3>Card heading</h3>
<p>Cards hold a block of related content.</p>
</article>
With a footer
<article class="card prose">
<h3>Delete this project?</h3>
<p>This cannot be undone.</p>
<footer class="card-actions flex" style="justify-content: end">
<button class="btn btn-secondary">Cancel</button>
<button class="btn">Delete</button>
</footer>
</article>
<article>
<h3>Delete this project?</h3>
<p>This cannot be undone.</p>
<footer class="flex" style="justify-content: end">
<button class="secondary">Cancel</button>
<button>Delete</button>
</footer>
</article>
Bordered
<div class="card-border prose">
<h3>Bordered</h3>
<p>A border instead of a shadow, on the page background.</p>
</div>
<div class="card-border">
<h3>Bordered</h3>
<p>A border instead of a shadow, on the page background.</p>
</div>
In 1.x, .card was the bordered variant. Both builds now share one
set of class names, so .card is the base card and the bordered one is
.card-border.