Blog, list


Install
npx shadcn add @klarhimmel/blog-listDetailsAbout, usage, props and more
Post rows with date, title, excerpt and category, plus a link to the full archive.
Import
Import
- blog/list
- Category
- Post cards, lists and the article page. New project? Set it up once: /get-started/installation.
Notes
When to use it
Archive-style rows with date, title, excerpt and category, ending in a link to every post. Use it when readers scan by date; blog-cards suits pictures.
Writing for it
- Write dates in one format across all rows, since the date field (30 characters) is shown as text in a left column. - Excerpts hold 200 characters and are limited in line length, so one tight sentence reads better than two clipped ones. - The more link is a secondary button beside the heading, so label it with the destination, such as 'View all posts'.
Watch out for
The block is built in a narrow container that widens only at large sizes, so it is not a full-width layout. It takes one to eight posts, and the whole row is clickable through the title link, so each row needs its own href.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Name the topic' | Text, up to 60 characters. |
title | string | 'Say what posts cover' | Text, up to 120 characters. |
description | string | 'Say in one line what the posts are …' | Text, up to 300 characters. |
posts | { date, title, excerpt, category, href }[] | 4 items | List of 1 to 8. Each item: date, title, excerpt, category, href. |
more | Link | {…} | See the type. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |