# Blog Page

> A React blog page template: a featured post, category chips, live search, a grid or list of post cards, pagination and a newsletter band.

- Type: React template (Templates)
- Access: Pro (the source needs a Wingo UI Pro plan, see https://wingo-ui.com/pricing)
- Version: 1.1.0
- Install: `npx wingo-ui@latest add blog-page`
- Docs: https://wingo-ui.com/templates/blog-page

## Interaction

The page opens with the featured post as one large card; every card is a single link to /blog/<slug> with its focus ring on the card. Tap a category chip (All, Product, Engineering, Design, Company, Guides; each shows its post count) to filter, or type in the search field (press / to focus it) and the cards filter live by title, excerpt and author while the field shows the result count. While filtering, the featured card steps aside and its post joins the grid; cards slide into place. No match shows an empty state with Clear filters. Load more posts appends the next page (the button spins while it loads and the bar under it shows how many you have seen), or numbered pagination pages through them and scrolls back to the filters. The newsletter band validates the email and confirms inline. On phones the chips become one row that scrolls sideways, the grid collapses to one column and the list layout puts a square cover beside each title.

## Installation

```bash
npx wingo-ui@latest add blog-page
```

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-page` (needs the @wingo-ui registry with your API key in components.json)

Files:

- `components/templates/blog-page.tsx`
- `components/templates/blog-page-data.ts`

npm dependencies: `npm i motion 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))
- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Marketing Footer](https://wingo-ui.com/components/marketing-footer) ([Markdown](https://wingo-ui.com/components/marketing-footer.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))
- [Empty State](https://wingo-ui.com/components/empty-state) ([Markdown](https://wingo-ui.com/components/empty-state.md))
- [Pagination](https://wingo-ui.com/components/pagination) ([Markdown](https://wingo-ui.com/components/pagination.md))
- [Search Input](https://wingo-ui.com/components/search-input) ([Markdown](https://wingo-ui.com/components/search-input.md))
- [useControllableState](https://wingo-ui.com/components/use-controllable-state) ([Markdown](https://wingo-ui.com/components/use-controllable-state.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))
- [Text match](https://wingo-ui.com/components/text-match) ([Markdown](https://wingo-ui.com/components/text-match.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)/blog/page.tsx
"use client"

import Link from "next/link"
import { BlogPage } from "@/components/templates/blog-page"
import { BLOG_POSTS } from "@/components/templates/blog-page-data"

export default function BlogRoute() {
  return (
    <BlogPage
      linkComponent={Link}
      posts={BLOG_POSTS}
      onSubscribe={(email) =>
        fetch("/api/newsletter", { method: "POST", body: JSON.stringify({ email }) })
      }
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `design?` | `"classic" \| "editorial" \| "minimal"` | `"classic"` | The whole page's look. classic follows the layout props on a glow with muted bands; editorial: a soft page, a centered header, a display-size title over a heavy rule, the featured post as a big story with a wide square cover, tab-style category filters, posts as ruled rows with the date in its own column, a split newsletter and a centered footer; minimal: a plain page, a transparent header, a narrow column, the featured post and every post as plain text lines with no covers or cards, text filters, no band and a simple footer. headerProps and footerProps still win. |
| `posts?` | `BlogPost[]` | `"BLOG_POSTS"` | Newest first: { slug, title, excerpt, category, date, readingTime, author, cover?, featured?, href? }. The one with featured: true leads the page. |
| `categories?` | `BlogCategory[]` | `"BLOG_CATEGORIES"` | { value, label } chips after All; a post's category is a value. |
| `labels?` | `Partial<BlogPageLabels>` | `"DEFAULT_BLOG_PAGE_LABELS"` | Every visible string: the heading, chips, search, empty state, pagination and newsletter copy. |
| `category?` | `string` |  | Controlled category filter ("all" or a category value); pair it with onCategoryChange. |
| `defaultCategory?` | `string` | `"all"` | The category the page opens on while uncontrolled. |
| `onCategoryChange?` | `(category: string) => void` |  | Called when a chip is picked. |
| `defaultQuery?` | `string` | `""` | The search text the page opens with. |
| `layout?` | `"grid" \| "list"` | `"grid"` | grid: cover on top of each card; list: one post per row with the cover beside it. Applies to the classic design. |
| `columns?` | `2 \| 3` | `3` | Grid columns on desktop (one on phones, two on tablets). Applies to the classic design. |
| `pagination?` | `"load-more" \| "numbers"` | `"load-more"` | load-more appends a page per press; numbers pages through the posts. |
| `pageSize?` | `number` | `6` | Posts per page (after the featured one). |
| `onLoadMore?` | `() => (void \| Promise<unknown>)` |  | Load more; a returned promise keeps the button loading. Without it the page waits 700 ms. |
| `showFeatured?` | `boolean` | `true` | The featured post card under the heading. |
| `showCategories?` | `boolean` | `true` | The category chips. |
| `showSearch?` | `boolean` | `true` | The search field. |
| `showNewsletter?` | `boolean` | `true` | The newsletter band before the footer. |
| `header?` | `boolean` | `true` | The sticky marketing header; turn it off when the page sits in a site layout. |
| `footer?` | `boolean` | `true` | The marketing footer. |
| `headerProps?` | `Partial<MarketingHeaderProps>` |  | Passed to MarketingHeader (announcement, ctaTone, items...). |
| `footerProps?` | `Partial<MarketingFooterProps>` |  | Passed to MarketingFooter. |
| `cardVariant?` | `"plain" \| "raised"` | `"plain"` | plain: covers and text right on the page; raised: each post on a surface card. Applies to the classic design. |
| `covers?` | `"color" \| "mono"` | `"color"` | Drawn covers tinted per category, or all neutral. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The selected chip, the pagination and the newsletter button. |
| `background?` | `"plain" \| "soft" \| "glow" \| "aurora" \| "grid" \| "dots"` | `"glow"` | The main background: plain is the bare page color; the others tint the page and add a glow, an aurora, a grid or dots over the first screen. A design picks its own unless you set one. |
| `backgroundColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint and glow color of the main background. |
| `bandBackground?` | `"muted" \| "tinted" \| "gradient" \| "dots"` | `"muted"` | The secondary background of the alternating bands. Cards, fields and tiles inside a band are lifted one step above it, so they never share its color. |
| `bandColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint of tinted and gradient bands; defaults to backgroundColor. |
| `radius?` | `"sm" \| "md" \| "lg"` | `"md"` | Radius of covers and cards: 12, 16 or 24px. |
| `loading?` | `boolean` | `false` | Skeleton cards in the real layout. |
| `animateIn?` | `boolean` | `true` | The heading and featured post rise in once on mount; off in thumbnails and under reduced motion. |
| `locale?` | `string` | `"en-US"` | Intl locale for dates and counts. |
| `getPostHref?` | `(post: BlogPost) => string` |  | Where a card links; default post.href, else /blog/<slug>. |
| `onSubscribe?` | `(email: string) => (void \| Promise<unknown>)` |  | The newsletter signup; a rejected promise shows the error. Without it the form waits 900 ms and succeeds. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"<a>"` | The router link for every link (next/link in an app); default the LinkProvider's. |
| `className?` | `string` |  | Classes for the root. |
| `classNames?` | `Partial<Record<BlogPageSlot, string>>` |  | Classes for intro, featured, filters, chips, search, posts, pagination and newsletter. |

## Parts

### BlogPostCard (component)

One post as a single stretched link: grid, list or the large featured layout. Takes article props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `post?` | `BlogPost` |  | The post. |
| `href?` | `string` |  | Default post.href, else /blog/<slug>. |
| `layout?` | `"grid" \| "list" \| "featured" \| "story" \| "row" \| "text"` | `"grid"` | Cover on top, beside the text, the large lead card; story: a wide cover over a display title; row: a ruled row with a date column; text: a plain text line with no cover. |
| `variant?` | `"plain" \| "raised"` | `"plain"` | Right on the page or on a surface card. |
| `radius?` | `"sm" \| "md" \| "lg"` | `"md"` | Cover and card radius. |
| `categoryLabel?` | `string` |  | The category's display name. |
| `covers?` | `"color" \| "mono"` | `"color"` | Tinted per category or neutral. |
| `headingAs?` | `"h2" \| "h3"` | `"h3"` | The title element. |
| `locale?` | `string` | `"en-US"` | Date format. |
| `featuredLabel?` | `string` | `"Featured"` | The badge on the featured layout. |
| `minRead?` | `(minutes: number) => string` |  | "11 min read". |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` |  | The router link. |

### BlogCover (component)

A cover drawn in code (a category tint, a pattern picked per post and the category glyph), or a photo when src is set. Takes div props; size it with an aspect class.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `src?` | `string` |  | A photo; without it the cover is drawn. |
| `alt?` | `string` | `""` | Alt text of the photo. |
| `seed?` | `string` |  | Picks the pattern and glow (the post slug). |
| `category?` | `string` |  | The category value: its glyph and tone. |
| `tone?` | `Tone` |  | Replaces the category's tone. |
| `icon?` | `ReactNode` |  | Replaces the category's glyph. |
| `size?` | `"sm" \| "md" \| "lg"` | `"md"` | The glyph tile. |

### BlogPostMeta (component)

The author avatar, name, date and reading time of a post. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `post?` | `BlogPost` |  | The post. |
| `size?` | `"sm" \| "lg"` | `"sm"` | sm: one line with a 24px avatar; lg: a 40px avatar over two lines. |
| `showAvatar?` | `boolean` | `true` | The author avatar. |
| `locale?` | `string` | `"en-US"` | Date format. |
| `minRead?` | `(minutes: number) => string` |  | "11 min read". |

### formatBlogDate (function)

formatBlogDate("2026-09-29", "en-US") gives "Sep 29, 2026", in UTC so server and browser agree.

### BLOG_POSTS (constant)

Twelve sample Acme posts from 2026, newest first; the board performance post is featured.

### BLOG_CATEGORIES (constant)

Product, Engineering, Design, Company and Guides.

### BLOG_AUTHORS (constant)

The Acme team as BlogAuthor objects with roles and bios.

### BLOG_CATEGORY_ICONS (constant)

The lucide glyph drawn on each category's covers.

### BLOG_CATEGORY_TONES (constant)

The tint of each category's covers and label.

### DEFAULT_BLOG_PAGE_LABELS (constant)

The English strings.

### BlogPost (type)

{ slug, title, excerpt, category, date, readingTime, author, cover?, featured?, href? }.

### BlogAuthor (type)

{ name, role, avatar?, bio?, href? }.

### BlogCategory (type)

One category chip, { value, label }; a post's category holds the value.

### BLOG_PAGE_DESIGNS (constant)

The design names, classic first: ["classic", "editorial", "minimal"].

### BlogPageProps (type)

Props of BlogPage: content, layout switches, labels and callbacks.

### BlogPageDesign (type)

"classic" | "editorial" | "minimal".

## Examples

- **Editorial design**: design="editorial": a display title over a heavy rule, the featured post as a big story, tab filters and ruled rows with a date column.
- **Minimal design**: design="minimal": a transparent header and a narrow column of plain text lines, with no covers, cards or bands.
- **List layout, numbered pages**: One post per row with the cover beside it, four per page, paged with numbers.
- **Raised cards, brand tone**: Surface cards in two columns, larger radius and the marketing orange on the chips and the newsletter.
- **Engineering, no results**: Opens on the Engineering chip with a search nothing matches: the empty state with Clear filters.
- **Monochrome, inside a site layout**: Neutral covers, no header, footer or newsletter: the index inside an existing layout.
- **Loading**: Skeleton cards in the real layout while posts load.

## See also

- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Pagination](https://wingo-ui.com/components/pagination) ([Markdown](https://wingo-ui.com/components/pagination.md))
- [Search Input](https://wingo-ui.com/components/search-input) ([Markdown](https://wingo-ui.com/components/search-input.md))
- [Empty State](https://wingo-ui.com/components/empty-state) ([Markdown](https://wingo-ui.com/components/empty-state.md))

---

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