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.
Installation
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.
Why is only the title a link?
The title's link covers the whole row, so a click anywhere opens the post and a screen reader hears one name per post. The sidebar's rows are ordinary links. The category and the byline are plain text.
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.
Related
- Pro
Compact List Blog
Post listsTwenty 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 gridsThe 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 indexesA 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
Nested Accordion Archive Blog
Archives by dateA 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.
- 1425Pro
Trending Posts Blog
Post listsSix 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
Minimal Article Blog
Article partsOne 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.