component :: Article Card

The .articleCard component is the blog-index pattern: image, tags, title, description, and a byline with avatar and date. .postList lays the cards out in equal-height responsive columns; this site’s own blog index is built from exactly these two components.

FileDescriptionSource
component.articleCard.cssArticleCard + PostList stylesGithub
component.card.cssBase card visuals (dependency)Github
ArticleCard.astro, PostList.astroThe Astro componentsGithub
Tags.astro, Avatar.astroComposed components (dependencies)Github
--articleCard-* block in default themeTheme token (see below)Github

HTML

ArticleCard extends the card (same border, radius, tokens) and composes Tags and Avatar; PostList is a ul over the grid system. The card carries one link β€” the title, stretched over the whole card with a ::after β€” so screen readers hear one link named by the title, and the tags stay independently clickable above it.

<ul class="postList grid" col="1" col-md="2" col-lg="2">
<li>
<article class="card articleCard">
<figure class="articleCard_media">
<img class="articleCard_image" src="cover.jpg" alt="" loading="lazy" />
</figure>
<nav aria-label="Tags"><ul class="tags tags-inline articleCard_tags">
<li><a href="/blog/tags/css">css</a></li>
</ul></nav>
<h3 class="articleCard_title"><a href="/blog/my-post">Designing with cascade layers</a></h3>
<div class="articleCard_description"><p>Why layer order beats specificity wars.</p></div>
<footer class="articleCard_byline">
<!-- avatar markup, see the Avatar docs -->
<div>
<span class="articleCard_author">Sonny Mueller</span>
<time datetime="2026-05-02">May 2, 2026</time>
</div>
</footer>
</article>
</li>
</ul>

Custom properties

PropertyDescription
--articleCard-image-aspect-ratioCover image ratio (defaults to --ar-golden).

Everything else (borders, radius, colors, spacing) comes from the card tokens.

Astro component

ArticleCard

PropTypeDefaultDescription
hrefstringβ€”Post URL. Required.
titlestringβ€”Post title (the card’s single link). Required.
imageSrcImageMetadata | stringundefinedCover image (imported asset or URL/path).
imageAltstring""Cover image alt text.
tagsstring[][]Tag names, rendered with the Tags component.
tagsUrlstring"/blog/tags"Base URL for tag links.
authorstringundefinedByline name (also feeds the Avatar initials).
avatarSrcImageMetadata | stringundefinedByline avatar image.
dateDateundefinedPublication date, rendered as a <time>.
localestring"en-US"Locale for the formatted date.
variantstringundefinedCard variant pass-through: filled, raised.
classstringundefinedAdditional CSS classes.

The default slot is the description (rich HTML welcome).

PostList

PropTypeDefaultDescription
colsnumber2Columns from --lg: 1, 2, or 3.

Children go in the default slot; wrap each card in an <li>.

Examples