Article Card

A linked article teaser: image, tag, date, title, excerpt. A composition of the Card surface, a Badge and the card title step, not a new primitive, and it restyles none of them.

import from ~/components/patterns/ArticleCard

A pattern, not a primitive

The card is assembled from parts that already exist. The surface and its hover are Card's interactive variant; the tag is a Badge; the heading is the card title step. Patterns live here, apart from the primitives, because they carry an editorial decision (which fields a teaser shows and in what order) that a single component should not.

The image is a slot, not a source. The card owns the aspect ratio and the clip; the caller owns loading, sizing and art direction by passing an <img> into it.

Anatomy

ArticleCard — image · tag · date · title · excerpt

One link wraps the whole card. The image is a slot; everything else is a labelled prop.

Convenience: src / alt

<ArticleCard src="/cover.jpg" alt="…" />

Pass src and the card renders the image itself: object-cover, loading='lazy', decoding='async'. Use the image slot only when you need a <picture>, a video or a placeholder.

In a grid

Guidance

Do

Pass the image as an <img> with object-cover into the slot. The card sets the aspect ratio and clips; the image fills it.
Keep the tag to a single category word. It is a Badge, not a description.
Give <time> a machine-readable dateTime alongside the human date, so the date is not just decoration.
Let the excerpt clamp. Three lines is the cap; write to it rather than relying on the ellipsis.

Don't

Do not put a second link inside the card. The whole card is already one link; a nested one is unreachable and invalid.
Do not stack more than a tag and a date in the meta row. Author, read-time and the rest belong on the article, not the teaser.