Blog Post Page React template for Tailwind CSS v4
v1.1.0Updated in 1.9.0
A React blog post template: byline, share actions, a drawn cover, a Markdown body with a sticky table of contents and reading progress.
A thin bar at the top of the window fills as you read. The breadcrumb links back to the blog and the category (on phones it becomes one back link). Copy link copies the address and turns into "Link copied" for two seconds; X, LinkedIn and email open a share in a new tab. The article is rendered from Markdown: headings, lists, a code block with a copy button, a quote, a table that scrolls sideways on phones and a figure drawn in code. On desktop the table of contents sticks beside the article, marks the section being read with a progress ring and jumps to a section on click; below 1024px it becomes a pill pinned under the header that opens a bottom sheet. Was this helpful? answers Yes with a thank-you, or No with a short comment box. The author card links to more posts, the three related posts are single links, and the newsletter band validates the email and confirms inline.
Blog Post Page is a Pro React template in the React website templates category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add blog-post-page, together with Blog Page, Marketing Section, Marketing Header, Marketing Footer, Avatar and 9 more and the npm packages motion and lucide-react.
Built with
The sections this page is made of. In the full-screen preview, hold Alt to outline each one on the page.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add blog-post-pageBlog Post Page is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans
Usage
Import BlogPostPage from @/components/templates/blog-post-page.
// app/(marketing)/blog/[slug]/page.tsx
"use client"
import Link from "next/link"
import { notFound, useParams } from "next/navigation"
import { BlogPostPage } from "@/components/templates/blog-post-page"
import { BLOG_ARTICLE_SAMPLE } from "@/components/templates/blog-post-page-data"
export default function BlogPostRoute() {
const { slug } = useParams<{ slug: string }>()
if (slug !== BLOG_ARTICLE_SAMPLE.slug) notFound()
return (
<BlogPostPage
linkComponent={Link}
article={BLOG_ARTICLE_SAMPLE}
onFeedback={(helpful, comment) =>
fetch("/api/feedback", { method: "POST", body: JSON.stringify({ slug, helpful, comment }) })
}
/>
)
}Props
designdefault"classic""classic" | "editorial" | "minimal"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, the byline under a heavy rule, a square wide cover, the contents on the left of a narrow reading column, quotes set as pull quotes between rules, ruled boxes, related posts as ruled rows, a split newsletter and a centered footer; minimal: a plain page, a transparent header, a narrower page with no cover, a plain byline, flat outlined boxes, related posts as text lines, no band and a simple footer. headerProps and footerProps still win.
articledefault"BLOG_ARTICLE_SAMPLE"BlogArticleThe post: BlogPost fields plus subtitle, body (Markdown), tags and url (for share links; default the page's own address).
relatedPostsdefault"BLOG_RELATED_SAMPLE"BlogPost[]Up to three cards under the article.
categoriesdefault"BLOG_CATEGORIES"BlogCategory[]Display names for category values.
figuresRecord<string, BlogFigureBar[] | ReactNode>Drawn figures for Markdown images whose src is #figure-<name>: bars for a bar chart, or any node. The sample has render-times.
labelsdefault"DEFAULT_BLOG_POST_PAGE_LABELS"Partial<BlogPostPageLabels>Every visible string: share, contents, feedback, author, related and newsletter copy.
showProgressdefaulttruebooleanThe reading progress bar at the top of the window.
showTocdefaulttruebooleanThe table of contents: sticky beside the article on desktop, a pill and a sheet on phones.
showSharedefaulttruebooleanCopy link, X, LinkedIn and email, in the byline and after the article.
showCoverdefaulttruebooleanThe cover under the byline (the minimal design has none).
showFeedbackdefaulttruebooleanThe "Was this helpful?" box.
showAuthordefaulttruebooleanThe author bio card.
showRelateddefaulttruebooleanThe related posts section.
showNewsletterdefaulttruebooleanThe newsletter band before the footer.
headerdefaulttruebooleanThe sticky marketing header; turn it off when the page sits in a site layout.
footerdefaulttruebooleanThe marketing footer.
headerPropsPartial<MarketingHeaderProps>Passed to MarketingHeader.
footerPropsPartial<MarketingFooterProps>Passed to MarketingFooter.
tocVariantdefault"line""line" | "dots" | "plain"The table of contents' look: a rail with a moving indicator, dots or plain links.
cardVariantdefault"plain""plain" | "raised"Related post cards right on the page or on surface cards. Applies to the classic design.
coversdefault"color""color" | "mono"Drawn covers tinted per category, or neutral.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The progress bar, the active contents entry, links, figure bars and the buttons.
backgrounddefault"glow""plain" | "soft" | "glow" | "aurora" | "grid" | "dots"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.
backgroundColordefault"oklch(0.62 0.14 275)"stringThe tint and glow color of the main background.
bandBackgrounddefault"muted""muted" | "tinted" | "gradient" | "dots"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.
bandColordefault"oklch(0.62 0.14 275)"stringThe tint of tinted and gradient bands; defaults to backgroundColor.
radiusdefault"md""sm" | "md" | "lg"Radius of the cover, cards and boxes.
animateIndefaulttruebooleanThe article header rises in once on mount; off in thumbnails and under reduced motion.
localedefault"en-US"stringIntl locale for dates and figure numbers.
blogHrefdefault"/blog"stringWhere Blog in the breadcrumb and All posts link; the category crumb adds ?category=<value>.
onFeedback(helpful: boolean, comment?: string) => (void | Promise<unknown>)Was this helpful?; called on Yes, on No and again with the comment. A returned promise keeps the button loading; without it the page waits 600 ms.
onSubscribe(email: string) => (void | Promise<unknown>)The newsletter signup; without it the form waits 900 ms and succeeds.
markdownPropsPartial<MarkdownProps>Passed to the article's Markdown (components, codeLineNumbers, linkTarget...).
linkComponentdefault"<a>"(props: LinkComponentProps) => ReactNodeThe router link for every link (next/link in an app); default the LinkProvider's.
classNamestringClasses for the root.
classNamesPartial<Record<BlogPostPageSlot, string>>Classes for progress, hero, breadcrumb, title, byline, share, cover, toc, body, tags, feedback, author, related and newsletter.
Parts
BlogBarFigure
componentA horizontal bar chart drawn with spans, so it can sit inside a Markdown paragraph. Takes span props.
barsBlogFigureBar[]{ label, value } rows.
captionReactNodeThe line under the chart (the image alt text).
unitdefault"ms"stringPrinted after each value.
localedefault"en-US"stringNumber format.
markdownToc
functionmarkdownToc(source) returns the h2 and h3 of a Markdown string as TocItem[], with the ids Markdown's headingIds gives them.
BLOG_ARTICLE_SAMPLE
constantThe sample article: "How we made Acme's board 10x faster" by Noah Mitchell.
BLOG_RELATED_SAMPLE
constantThree related posts from BLOG_POSTS.
DEFAULT_BLOG_POST_PAGE_LABELS
constantThe English strings.
BlogArticle
typeBlogPost & { subtitle?, body, tags?, url? }.
BlogFigureBar
typeOne bar of a BlogBarFigure chart: { label, value }.
BLOG_POST_PAGE_DESIGNS
constantThe design names, classic first: ["classic", "editorial", "minimal"].
BlogPostPageProps
typeProps of BlogPostPage.
BlogPostPageDesign
type"classic" | "editorial" | "minimal".
Examples
Editorial design
design="editorial": a display title over a heavy rule, a narrow reading column with the contents on the left, pull quotes and ruled related rows.
Minimal design
design="minimal": no cover, a plain byline, flat outlined boxes and related posts as plain text lines.
Brand tone, raised cards
The marketing orange on the progress bar, the contents and the buttons; related posts on surface cards.
Dots contents, monochrome
The dotted table of contents, neutral covers and a larger radius.
Reading mode
No cover, share, feedback or newsletter: just the article, its contents and the author.
Inside a site layout
Header and footer off, for a blog that already has its own chrome.
Dependencies
Files
- components/templates/blog-post-page.tsx
- components/templates/blog-post-page-data.ts
FAQ
Is the React Blog Post Page template free?
The preview, props and docs are free; copying the source needs a Pro plan. See plans.
How do I install Blog Post Page?
Run npx wingo-ui@latest add blog-post-page. It also adds the Wingo UI items it builds on (Blog Page, Marketing Section, Marketing Header, Marketing Footer, Avatar and 9 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/blog-post-page.
How does Blog Post Page behave on phones?
The breadcrumb links back to the blog and the category (on phones it becomes one back link). The article is rendered from Markdown: headings, lists, a code block with a copy button, a quote, a table that scrolls sideways on phones and a figure drawn in code.
See also
Related guides
- Nextjs Blog Template: Markdown, Live Demos and JSON-LD
Build it: screens and apps10 min read
- Nextjs JSON LD: Typed Schema That Matches the Page
Next.js and Tailwind CSS10 min read
New components by email
New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.