Skip to content

Blog Grid

A blog index: a featured post and a grid of cards with cover, tags, title, excerpt, author, date and reading time. Tag chips filter it, and Load more or numbered pages page through it.

On this page
Used for
  • Engineering blog index
  • Release posts archive
  • Tagged post lists
  • Featured article

Examples

List layout

Preview

Installation

npx knowns-ui@latest add blog-grid
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

posts
BlogPostSummary[]
{ id, title, excerpt?, href?, tags?, author: { name, avatar? }, date, minutes?, cover?: { src?, alt?, hue? }, featured? }. Without src, the cover is a pattern in the given hue.
title / description
ReactNode
The header.
featured
boolean
Defaulttrue
The featured (or first) post as a large card. Hidden while a tag is selected.
filter
boolean
Defaulttrue
Tag chips with counts.
layout
"grid" | "list"
Default"grid"
Grid: a featured card and cards. List: compact rows with a small cover, for archives.
pageSize / paging
number / "load-more" | "pagination"
Default6 / "load-more"
How the grid pages.
onSelect
(post) => void
For cards without href, or to track clicks.
empty
ReactNode
Defaultbuilt-in
Shown when a tag has no posts.

What it handles

  1. 01Shows a large featured card, the first post or the one marked featured, above a grid of cards with cover, tags, title, excerpt, author, date and reading time.
  2. 02Builds tag chips from the posts with a count each, and hides the featured card while a tag filter is active.
  3. 03Pages the rest with a Load more button or numbered Pagination, set by paging and pageSize with a default of 6.
  4. 04Renders every card as a link when it has an href and as a button that calls onSelect when it does not.
  5. 05Switches layout to list for compact archive rows with a small cover that appears from 520px.
  6. 06Shows an empty state with a Show all posts button when a tag leaves nothing, and announces the filtered count for screen readers.

States

First render
Nothing. The cards paint as they are
none
Card hover
The cover scales up slightly
280ms, ease out
Tag filter
The list changes at once and the page resets to 1
none
Load more
The next page of cards is added to the grid
none, at once
Reduced motion
The cover stays still
0ms

Works with

When to use

When to use

  • A blog or news index with a featured post and filters by tag.
  • Any card grid of articles: guides, case studies, release notes.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Blog Grid to my app and wire it to my own data.
  • I need a blog or news index with a featured post and filters by tag. Set that up with the Knowns UI Blog Grid.
  • Which Blog Grid props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "blog-grid" }) and search_docs({ query: "blog grid" }).

Need help?

Stuck on Blog Grid, or found something off? We read every message.