# Blog, cards

- **[Sections](/blocks/)**
- **[Blog](/blocks/blog/)**
- **Blog, cards**

A grid of article cards with image, category, title, excerpt and date, plus a link to all posts.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/blog-cards
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/blog-cards';
  ```

Also called

- blog/cards

- **Category**: Post cards, lists and the article page. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: A grid of article cards with image, category badge, title, excerpt and date line, for a journal landing section. For an archive that is easy to scan, use `blog-list`.
- **Writing for it**: - Each post title is required and holds 100 characters; write it as the thing a reader learns. Set showHeader to false when the surrounding page supplies the section heading and introduction, so the grid starts without duplicate copy or spacing.
- Use the meta field (60 characters) for date and reading time together, as in 'Mar 12, 2026 · 6 min read'. It is a plain text line, so format the date yourself.
- Keep the category to one word of up to 30 characters. It becomes a badge, and a long one wraps awkwardly.
- **Watch out for**: Each post uses the href field as the destination of the title link, and nothing else on the card is a separate link. A post with an empty href still renders but points nowhere. Also, one to six posts only, with a card image forced to 16 by 10.

## Pairs well with

- **[Newsletter, inline](/blocks/newsletter/inline)**
- **[Call to action, band](/blocks/cta/banner)**
- **[Blog, list](/blocks/blog/list)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import BlogCards from '@/components/klarhimmel/blocks/blog-cards';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <BlogCards props={{
          "eyebrow": "Name the topic",
          "title": "Say what the posts are about",
          "description": "Say in one line who writes the posts and what they offer.",
          "posts": [
            {
              "category": "Category",
              "title": "Say what the post is about, as a title",
              "excerpt": "Say in one or two sentences what the reader gets from the post.",
              "meta": "1 Jan 0000 · 0 min read",
              "href": "#post-1",
              "media": {
                "src": "/pictures/photo-bakery1.avif",
                "alt": "A bakery counter with loaves and pastries behind glass"
              }
            },
            {
              "category": "Category",
              "title": "Say what the post is about",
              "excerpt": "Say in one or two sentences what the reader gets from the post.",
              "meta": "1 Jan 0000 · 0 min read",
              "href": "#post-2",
              "media": {
                "src": "/pictures/photo-barber1.avif",
                "alt": "An empty barbershop with chairs and mirrors"
              }
            }
          ],
          "more": {
            "label": "Second action",
            "href": "#journal"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## 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.

- **showHeader**: Optional; empty is not rendered.
- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters.
- **posts**: List of 1 to 6. Each item: category, title (optional), excerpt, meta, href, media.
- **more**: See the type.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/changelog/timeline)

[Next](/blocks/blog/list)
