Skip to content
Viewership Inquire
Website Components

Blog Grid.

Recent posts as a responsive grid of post cards, with a headline and a link to the full archive.

FeaturesSection1 dependency Original, MIT

.md
Style

Using Claude Code? Give it the agent prompt and skip these steps.

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy BlogGrid.astro

    Paste into src/components/viewership/blog-grid/

  3. Copy its dependencies

    Each in its own folder, next to this one.

  4. Use it

    Page.astro
    ---
    import BlogGrid from "../components/viewership/blog-grid/BlogGrid.astro";
    ---
    
    <BlogGrid />

Props 6

PropTypeDefaultDescription
title string · Headline.
accent string · Closing words of the headline, drawn in the theme's accent style.
body string · Short line under the headline.
posts PostCard props[] · The posts, newest first. Each takes the same props as Post Card.
all { label: string; href: string } · Link to the archive, beside the headline.
as "h1" | "h2" "h2" Heading element. Card titles step down one level.

Source 1 file

Original, MIT.