Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Sortable Media Mentions About Block for React

An index of eight press mentions for a PR tool as two-line rows, each with the masthead, the kind of piece, the day and the headline as a link, and the reach at its end; a Select sorts them by newest or by reach.

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 press index for React with Base UI, written for Beaconly, a fictional PR tool. A compact header has a Select at its end that sorts the mentions by newest or by largest reach. Below it, eight mentions are rows ruled from rail to rail: the masthead in serif type, a badge for the kind of piece and the day on the first line, the headline as the row's one link on the second, and the monthly readers of the outlet at the end, which drops under the headline on a phone instead of disappearing. The list is the last band of the block, so it ends on its last row. Days are written without a year and sit in time elements. It's built from Select, Badge and Guides, with CSS for the entrance and your theme's tokens for every colour. For about pages and press pages that want an honest index of coverage rather than a wall of logos. The outlets, headlines and figures are example data.

FAQ

How do I change the mentions?

They are MENTIONS at the top of the file: an outlet, a headline, a kind, the day as month and day for the time element and the same day as read, and the reach as a number. The reach is formatted compactly (1.9M, 640K). Add more rows and keep the order of the data newest first; the sort does the rest.

How does the sort work?

The Select picks between Newest first and Largest reach and the rows are re-ordered in place from the same data; nothing is fetched. A polite status says how the list is sorted, so the change is announced. The Select opens with Enter or Space and moves with the arrow keys on every library.

Why are the days written without a year?

A year goes stale the day the page ships. The days are month and day in time elements, and "newest" is worked out from them, so the list assumes one year of coverage. If you show older pieces, put the full date in the dateTime attribute and sort on that.

How is it read by a screen reader?

The block has an h2, and each mention is a list item with an h3 holding the link. The whole row is clickable through the link's stretched hit area, and its focus ring is drawn around the row. The kind and day are read before the headline, the reach after it.

How does it fit on a phone?

The Select takes the full width under the header, and each row stacks: masthead, kind and day, then the headline, then the reach as a single line. Nothing scrolls sideways at 320 pixels, and in a right-to-left layout the figures stay in reading order.

What moves, and what happens with reduced motion?

The header and the list fade up once on load and the link's arrow nudges on hover, all with CSS. With reduced motion nothing moves. Sorting re-orders the rows without animation.

  • Pro

    Pull Quotes and Press Kit About

    Press and recognition

    A press page for a ticketing company: three pull quotes set as headlines with the outlet in serif lettering, and a press kit of three real files that download from the page, a boilerplate with a Copy button and a press contact.

  • Pro

    A compact hero for a code review tool: copy and two calls to action, then a band across the column of four press quotes in cells that share their dividers, a row to swipe on a phone.

  • Pro

    Citable Publications About

    Press and recognition

    A bibliography for a research platform: eight publications as a numbered list in citation form, a type filter, and a Cite button on each row that copies the reference.

  • Pro

    A recognition shelf for a grant platform in two tabs: six plaques with a drawn laurel, the prize, who gave it and the year won, or six certifications with a stamped ring and when each renews.

  • Pro

    The front page of a newsletter platform's blog laid out like a magazine: a category filter, a featured story with a drawn typographic cover, two small stories and a wide one, and the other categories dimmed when one is chosen.

  • Pro

    Podcast Show Notes About

    Press and recognition

    Show notes for a podcast hosting company's own show: a scrolling vertical list of eight episodes at the start and the chosen episode's notes at the end, with a summary, chapters drawn to scale and listed with time stamps, and a Listen link.