Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Post Rows With Sidebar Blog Block for React

A reading layout: five post rows with small drawn route maps at the start, and behind a divider a sidebar of topics with counts, a numbered most-read list and the archive by year.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A classic blog layout for React with Base UI, written for Sidelong, a travel-writing blog. At the start, a heading and five post rows on hairlines: each row has a small drawn route map (a river, three stops joined by a dashed line and a scale bar), the category, the title as the row's one link, a two-line dek and a byline with the date and the reading time. At the end, behind a divider that runs up to the page's top rule, a sidebar lists the topics with their post counts, the month's most read posts as a numbered list, and the archive by year. On a phone the sidebar stacks under the posts, set off by a rule, and the dek drops out of the rows so five posts fit in about two screens. It's built from Guides and Badge, with CSS for the entrance and the hover. For personal blogs, magazines and any archive where readers browse by topic.

FAQ

How do I change the posts and the sidebar?

The posts are POSTS, with a route for each cover (three stops and where the river crosses); the sidebar's lists are TOPICS, POPULAR and ARCHIVE. Counts are written in the data, so keep them in step with your real archive; nothing here is computed from the posts.

How are the route maps drawn?

Each cover is one small SVG: a faint grid, a river line, a dashed route through three stops (the first hollow, the last solid) and a scale bar. Every stroke is a hairline in a theme token and the whole cover is aria-hidden artwork; a right-to-left page never mirrors it, as a map wouldn't be.

How does the divider reach the top rule?

The block's column is the grid, and the two parts carry the padding, so the divider (a start border on the sidebar) runs from the page's top rule to the foot with a plus mark where it meets the rule. Below lg that border is replaced by a rule between the posts and the sidebar.

How does it fit on a phone?

The rows keep their route map at the start at a smaller size, the dek is hidden below sm, and the sidebar stacks under the list with the topics, the numbered list and the archive one after another. Nothing scrolls sideways at 320 pixels.

Does it work right to left?

Yes. The map moves to the start of the row, which is the right-hand side, the sidebar goes to the left, the divider stays between them, and counts and dates are isolated with bdi.

  • Pro

    Twenty posts as dense one-line rows like a printed contents page: date, title, a dotted leader and the reading time, eight shown and twelve behind a Show more button.

  • Pro

    Cards Grid Blog

    Card grids

    The six latest posts of an engineering blog as cards on shared hairlines: drawn greyscale covers, a category, the title as the card's one link, a one-line dek and a byline with the date and reading time.

  • Pro

    Categories Blog

    Topics and indexes

    A houseplant magazine's category index: seven cells on shared hairlines, each a link with an icon ring, a scope, the latest post, a post count and a bar for its share, derived from the list of posts.

  • Pro

    A farm journal's archive as a nested accordion, years that open to months and months that open to posts, with counts worked out from the posts and an Expand all control.

  • Pro

    Six ranked stories in two columns of three on shared hairlines, each with a huge outline numeral and its move since last week, as an arrow and a number.

  • Pro

    One article's opening and nothing else: a narrow reading measure with title, dek and byline, two paragraphs with a sunk initial, and a quiet Continue reading link.