shadcn.io is not affiliated with official shadcn/ui
Margin Note Editorial Blog Block for React
Three editor's picks as split rows: the post with a numeral tile at the start and, in a tinted margin cell at the end, the editor's note with a hanging quote mark and a marked reason.
Installation
Overview
An editor's-picks block for React with Base UI, written for Cleat Review, a design-criticism magazine. A start-aligned header sits over three rows on hairlines that run rail to rail. Each row is a split on its own divider. At the start is the post: a "No. 1" to "No. 3" tile in display type, the title as the row's only link, a dek and the byline. At the end, in a tinted margin cell, is the editor's note: a hanging quote mark, one sentence whose reason is marked with a highlighter that draws across it, and the editor's initials avatar and name. On a phone the note sits under the post. It's built from Highlight Text, Avatar and Guides, with CSS for the entrance and the hover. For magazines, review sites and newsletters where one editor's voice is the draw.
FAQ
How do I add my own picks?
Edit PICKS at the top of the file: a title, dek, author, an ISO date, minutes, an href and the editor's note in three parts: the words before the marked reason, the reason itself and the words after. The tiles are numbered from the order of the list and EDITOR names the editor.
How does the highlighter work?
The reason is drawn with the catalog's Highlight Text: a neutral marker (the foreground colour at 12%) that sweeps across the words once, each row a moment after the one above. With reduced motion the marker is simply there. The phrase stays ordinary text in the sentence, so a screen reader reads the note unbroken, after a hidden "Marta Kowalska, editor:".
What is the link in each row?
The title is the row's only link, and its ::after box covers the post cell, not the note. The focus ring is drawn around that cell. The note is not a link, so selecting its text never opens the post.
Why is the numeral a tile and not a cover image?
Cleat Review has no photographs to show, so the tile is a typographic cover: the number in display type on a muted square. It's hidden from assistive technology, and the title carries the meaning. To use an image instead, put it in the tile's place.
Related
- Pro
Staff Bookshelf Team Picks Blog
Authors and staffA bookshelf of five staff picks on cells with line overshoot: each colleague's initials, name and role, the post they chose as a link, and one hanging-quote sentence on why, with two pickers shown as an avatar group.
- Pro
Q and A Interview Blog
Story formatsAn interview told in four question-and-answer bands: the host's question at the start, the guest's answer at the end, both speakers' initials avatars in the header, and one phrase marked with a highlighter.
- Pro
Author Frame Guest Post Blog
Article partsA guest post on an outdoors blog: a header with the one Pitch a guest post button, an article under a Guest post badge, and an About the author frame with a bio and three icon links that carry tooltips.
- ““““Pro
Pull Quotes Blog
Article partsFour pull quotes from a science-writing blog in cells with line overshoot: a large drawn quotation mark, the key phrase marked by a highlighter, who said it and in which post, a Copy button and a Read in context link.
- Pro
Featured Post Blog
Featured storyOne 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.
- 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.