Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Breadcrumb Post Header Block for React

An essay's header with a breadcrumb trail whose collapsed middle opens a menu of the parents it hides, the title, a dek and a byline band with the author, date and reading time.

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

The header of a single essay for React with Base UI, written for Longshore, an essay journal about coastlines. A breadcrumb trail sits over the title: Journal, a collapsed middle, Long-form, and the post itself. The ellipsis in the middle is a button that opens a menu of the two parents it hides, so the path never wraps and every parent stays one choice away; the current page is plain text that is cut short with an ellipsis when the line is full. Under the title and a one-sentence dek, a byline band on its own hairline holds the author's initials, the fixed publication date, the reading time and the category. It follows your theme and draws only type and rules, so it sits above any article body. It's built from Breadcrumb, DropdownMenu, Avatar, Badge, Button and Guides, with CSS for the entrance.

FAQ

How do I change the trail?

Edit ROOT, HIDDEN and SECTION at the top of the file, and the POST object for the title, dek, author, date and reading time. HIDDEN is the list of parents the ellipsis folds away, outermost first; the menu and its accessible name ("Show Essays and Coastlines") are built from it. The trail is a navigation landmark labelled Breadcrumb, and the current page is not a link.

How does the collapsed middle work?

The ellipsis is a ghost icon button with a name that lists what it hides. It opens a menu of links, one per hidden parent, and Escape closes it and returns focus to the button. The middle stays collapsed at every width, which keeps the line short on a phone and quiet on a desktop. To show every parent on wide screens, render the hidden links as breadcrumb items from md and keep the menu for smaller screens, as the breadcrumb banner does.

What happens to a long title in the trail?

The last crumb is the only one that shrinks: it truncates with an ellipsis, while the title in full is the heading right under the trail. Nothing wraps and nothing scrolls sideways, down to a 320 pixel screen.

Are the date and the reading time live?

No. The date is fixed text in the data, written as an ISO string and formatted in UTC so the server and the browser print the same day, and the reading time is a number you set. Nothing is computed from today.

Does it work right to left?

Yes. The trail, the byline and the spacing use logical properties, the chevrons mirror, and the date and the reading time are isolated with bdi so "14 min read" keeps its order.

  • Pro

    A 44-pixel top bar for a documentation site: a home icon and a real breadcrumb trail, whose middle crumbs fold into an ellipsis menu below the md breakpoint.

  • Pro

    A framed, fixed-height essay with six sections beside a rail that follows the section in view with a sliding bar, and a Jump to select on phones; choosing a section scrolls the essay, never the page.

  • Pro

    Post Footer Blog

    Article parts

    The end of an article: tags as links, a share cluster whose Copy link really copies, an author panel beside Published and Updated dates, and Previous and Next as two cells on a shared hairline with arrow key hints.

  • Pro

    Author Profile Blog

    Authors and staff

    One writer's profile in a split: a large initials avatar, name and role, a bio, icon links with tooltips, a Follow toggle that reads Following, three figures from her posts, and her four newest posts as a list.

  • Pro

    Featured Post Blog

    Featured story

    One lead post as a split, its copy beside a drawn greyscale cover behind a divider, with three more posts as cells on shared hairlines under it.

  • Pro

    Series Tracker Blog

    Tutorials and series

    A reader's place in a six-part series: the catalog's vertical Steps with a tick for each part read, the current part's panel with a typographic cover, a thin progress bar and a Shine Button that continues to the next part.