Cards

card is a styling class, not an element. It paints a bordered, padded surface and nothing else. Its children flow at the same --gap as the rest of the page, so adding or removing card never reflows the content. Put it on the element that already carries the meaning.

<article class="card">
  <h3>Title</h3>
  <p>Body…</p>
</article>

<div class="grid cols-3">
  <div class="card">A tile</div>
</div>
The card class on an article and a grid tile

Article card

An article is a self-contained, syndicatable unit: a blog post, a product, a document tile. Add card to box it; it needs its own heading. A list of articles without the class stays a plain list of text.

A self-contained unit

Content that would still make sense lifted out of the page and shown on its own.

Another unit

Each article is independent; the box is opt-in, one class at a time.

<article class="card">
  <h3>Title</h3>
  <p>Body…</p>
</article>
An article card with its own heading

Section card

A section is a titled thematic group. As a card it's a boxed group, and its heading drops a level like any nested section, because it's a section, not because it's a card.

A titled group

A run of related content gathered under one heading, set on its own surface.

<section class="card">
  <h3>Group title</h3>
  …
</section>
A section card grouping content under a title

Content card

A p as a card is a single run of prose set apart from the flow: a note or callout. One paragraph: if it needs a title use a section card, if it's self-contained use an article card.

A note, boxed off from the surrounding text, the same paragraph you would write anyway, just given a surface.

<p class="card">A note…</p>
A single paragraph as a content card

Layout card

A div is the box with no standalone meaning, a surface placed by a layout, such as a cell in a row or grid. Reach for it only when none of the others fit: if it gains a title it becomes a section card, a single paragraph is a content card.

Tiles

A box positioned by the grid.

Panels

Grouping controls with no heading.

Surfaces

Meaning stays out of it on purpose.

<div class="grid cols-3">
  <div class="card">…</div>
</div>
Div layout cards placed by a grid