# Blog Cards Section

> A "From the blog" section: the latest posts as cards, a featured post with a list, dated rows or a sideways rail, with covers drawn in code.

- Type: React block (Marketing Sections)
- Access: Pro (the source needs a Wingo UI Pro plan, see https://wingo-ui.com/pricing)
- Version: 1.0.1
- Install: `npx wingo-ui@latest add blog-cards-section`
- Docs: https://wingo-ui.com/components/blog-cards-section

## Interaction

Each post is one link to /blog/<slug>: hovering lifts the card, zooms its cover glyph and underlines the title, and tabbing to it draws the focus ring around the whole card. Covers are drawn in code (a gradient tile per category with its glyph, or a quiet tint in the tone), so nothing loads. The grid shows three cards, two columns on tablets and one on phones; featured puts the latest post large beside a list of compact rows with small covers; list shows rows with a big month and day column and a cover on the right from 768px; rail is a sideways scroller that snaps card by card, swipes on touch and bleeds to the screen edge, with previous and next buttons that disable at the ends. "View all posts" under the heading links to /blog.

## Installation

```bash
npx wingo-ui@latest add blog-cards-section
```

Pro item: run `npx wingo-ui@latest login` once with a Pro account. The CLI adds the files, their dependencies and a version record for updates.

With shadcn: `npx shadcn@latest add @wingo-ui/blog-cards-section` (needs the @wingo-ui registry with your API key in components.json)

Files:

- `components/blocks/blog-cards-section.tsx`

npm dependencies: `npm i lucide-react`

Wingo UI dependencies (installed automatically):

- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Avatar](https://wingo-ui.com/components/avatar) ([Markdown](https://wingo-ui.com/components/avatar.md))
- [Badge](https://wingo-ui.com/components/badge) ([Markdown](https://wingo-ui.com/components/badge.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Motion presets](https://wingo-ui.com/components/motion) ([Markdown](https://wingo-ui.com/components/motion.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.md))
- [Tones](https://wingo-ui.com/components/tones) ([Markdown](https://wingo-ui.com/components/tones.md))
- [UIProvider](https://wingo-ui.com/components/ui-config) ([Markdown](https://wingo-ui.com/components/ui-config.md))

## Usage

```tsx
// app/(marketing)/page.tsx
"use client"

import Link from "next/link"
import { BlogCardsSection, type BlogCardsPost } from "@/components/blocks/blog-cards-section"

const posts: BlogCardsPost[] = [
  {
    slug: "plan-a-quarter-in-one-afternoon",
    title: "How we plan a quarter in one afternoon",
    excerpt: "Our six-step ritual for turning a messy backlog into a plan.",
    category: "planning",
    author: { name: "Emma Carter", role: "CEO" },
    date: "2026-10-01",
    readingTime: 7,
  },
]

export default function Home() {
  return <BlogCardsSection layout="featured" posts={posts} linkComponent={Link} />
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `eyebrow?` | `ReactNode` | `"Blog"` | The small line over the title. |
| `title?` | `ReactNode` | `"From the blog"` | The section title. |
| `description?` | `ReactNode` | `"Notes on planning, writing and shipping from the team behind Acme."` | The paragraph under the title. |
| `actions?` | `ReactNode` |  | Extra buttons under the heading, after View all posts. |
| `posts?` | `BlogCardsPost[]` | `"BLOG_CARDS_SAMPLE"` | { slug, title, excerpt?, category, author: { name, role?, avatar? }, date (ISO), readingTime? (minutes), href? }. |
| `categories?` | `Record<string, BlogCardsCategory>` | `"BLOG_CARDS_CATEGORIES"` | { label, icon?, color? } per category key: the tag text, the cover glyph and the cover color. Unknown keys show the key with a newspaper glyph. |
| `layout?` | `"grid" \| "featured" \| "list" \| "rail"` | `"grid"` | grid: three cards (two on tablets, one on phones); featured: the latest post large beside compact rows; list: rows with a date column in a 960px column; rail: a snap scroller with previous and next buttons. |
| `limit?` | `number` | `0` | How many posts show; 0 picks by layout (grid 3, featured 4, list 4, rail 6). |
| `align?` | `"start" \| "center"` | `"center"` | Where the heading sits. |
| `cover?` | `"gradient" \| "soft" \| "none"` | `"gradient"` | gradient: a colored tile per category with its glyph; soft: a quiet tint with the glyph in the tone; none: text-only cards. |
| `card?` | `"raised" \| "flat" \| "none"` | `"raised"` | The surface behind grid, featured and rail cards: raised, a flat tint or nothing. |
| `radius?` | `"sm" \| "md" \| "lg"` | `"lg"` | Card corners: 12, 16 or 24px; the cover follows. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The category tags and the glyph on soft covers. |
| `showExcerpt?` | `boolean` | `true` | The summary under each title. |
| `showAuthor?` | `boolean` | `true` | The author's avatar initials and name. |
| `showReadingTime?` | `boolean` | `true` | "7 min read" next to the date. |
| `showViewAll?` | `boolean` | `true` | The View all posts button under the heading. |
| `viewAllHref?` | `string` | `"/blog"` | Where View all posts links. |
| `basePath?` | `string` | `"/blog"` | Posts without an href link to basePath/slug. |
| `locale?` | `string` | `"en-US"` | Intl locale for the dates; default the UIProvider's locale, else en-US. |
| `headingSize?` | `"md" \| "lg"` | `"md"` | lg when the section opens the page. |
| `headingAs?` | `"h1" \| "h2" \| "h3"` | `"h2"` | The title element; post titles are h3. |
| `background?` | `"none" \| "muted"` | `"none"` | muted sets the section on a gray band. |
| `spacing?` | `"none" \| "sm" \| "md" \| "lg"` | `"md"` | Vertical padding of the section. |
| `width?` | `"sm" \| "md" \| "lg" \| "xl"` | `"lg"` | The content column: 720, 960, 1200 or 1400px. The list layout narrows lg to 960px. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` |  | The router link for posts and View all (next/link in an app); default the LinkProvider's. |
| `labels?` | `Partial<BlogCardsSectionLabels>` |  | viewAll, readingTime ({minutes}), latest, rail (the scroller's label), previous, next, byAuthor ({name}). |
| `className?` | `string` |  | Classes for the <section>. |
| `classNames?` | `Partial<Record<BlogCardsSectionSlot, string>>` |  | Classes for list, item, cover, body, category, title, excerpt, meta, author, date, controls and viewAll. |

## Parts

### BLOG_CARDS_SAMPLE (constant)

Six Acme posts on planning, docs, automations, insights and product, Aug to Oct 2026.

### BLOG_CARDS_CATEGORIES (constant)

The sample categories with a lucide glyph and a cover color each.

### DEFAULT_BLOG_CARDS_SECTION_LABELS (constant)

The English strings.

### BlogCardsPost (type)

One post card: slug, title, excerpt, category, author, date, reading time and an optional href.

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `slug` | `string` |  | The url segment after basePath. |
| `title` | `string` |  | The post title, also the link text. |
| `excerpt?` | `string` |  | One or two sentences. |
| `category` | `string` |  | A key of the categories map. |
| `author` | `{ name: string; role?: string; avatar?: string }` |  | Shown as avatar initials (or the photo) and name. |
| `date` | `string` |  | ISO date, formatted in the locale. |
| `readingTime?` | `number` |  | Minutes. |
| `href?` | `string` |  | Overrides basePath/slug. |

### BlogCardsCategory (type)

{ label, icon?, color? }.

### BlogCardsAuthor (type)

{ name, role?, avatar? }.

### BlogCardsSectionLabels (type)

The strings the labels prop overrides.

### BlogCardsSectionLayout (type)

"grid" | "featured" | "list" | "rail".

### BlogCardsSectionProps (type)

Props of BlogCardsSection.

## Examples

- **Three latest posts**: The grid: gradient covers per category, the author and reading time on every card.
- **Featured post and a list**: The latest post large, the next three as compact rows with small covers.
- **Dated list**: Rows with a month and day column on a muted band, soft covers in the brand tone.
- **Swipeable rail**: All six posts in a sideways scroller that snaps card by card, with previous and next buttons.
- **Text-only cards**: No covers and no excerpts: just the category, the title and the byline, for a quiet footer band.

## See also

- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Feature Grid](https://wingo-ui.com/components/feature-grid) ([Markdown](https://wingo-ui.com/components/feature-grid.md))
- [Card](https://wingo-ui.com/components/card) ([Markdown](https://wingo-ui.com/components/card.md))
- [Avatar](https://wingo-ui.com/components/avatar) ([Markdown](https://wingo-ui.com/components/avatar.md))
- [Carousel](https://wingo-ui.com/components/carousel) ([Markdown](https://wingo-ui.com/components/carousel.md))

---

Canonical: https://wingo-ui.com/components/blog-cards-section
More components: https://wingo-ui.com/components · Index for agents: https://wingo-ui.com/llms.txt
