shadcn.io is not affiliated with official shadcn/ui
Disclosed Sponsored Posts Blog Block for React
Four sponsored posts, each labelled Sponsored with the sponsor's typographic monogram, a Why am I seeing this popover on editorial independence, and a closing band that sets sponsored apart from editorial with a strip of twelve issues.
Installation
Overview
A sponsored-posts section for React with Base UI, written for Gitmoor Weekly, a developer newsletter. A start-aligned header carries a "Why am I seeing this?" outline button that opens a popover on editorial independence. Four rows follow, newest first: a typographic monogram for the sponsor (two letters in display type with one rule placed differently for each), a "Sponsored" badge and the sponsor's name, the title as the row's one link, a one-line dek, the issue's date and the reading time. A closing band sets sponsored apart from editorial in two columns and draws the last twelve issues as ticks, hollow for an issue that carried a sponsored post. The counts and the share are worked out from the typed issues. The sponsors are invented. It's built from Guides, Badge, Button and Popover. For newsletters, magazines and blogs that run sponsored content and say so.
FAQ
How do I use my own sponsors and issues?
Edit ISSUES at the top of the file: each issue has a fixed sent date, the number of editorial posts and a sponsored post (or null) with its sponsor, two-letter monogram, mark (where the rule sits), title, dek and minutes. The rows are the issues that have a sponsored post, newest first; the counts, the percentage and the tick strip are calculated from the list.
What does the popover say, and can I use it without a mouse?
It explains how sponsorship works (one labelled post in one issue, no drafts shared, no reviews for sale), how many of the last twelve issues carried one, and links to a sponsorship policy. It opens from a real button, closes with Escape and returns focus to the button.
How is the sponsored label kept honest?
Every row carries the visible word "Sponsored" in a badge next to the sponsor's name, not only a colour or an icon, and the closing band repeats the rule in plain words. The monograms are drawings, hidden from assistive technology, and the sponsor's name is text.
Related
- 52515049Pro
Sortable Issue Archive Newsletter Blog
Archives by dateA newsletter's back issues as rows with large mono issue numbers, subject lines, dates and an open-rate bar, with a Select that sorts them by newest, best opened or oldest.
- 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
Margin Note Editorial Blog
Featured storyThree 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.
- Pro
Syndicated Filter Crosspost Blog
Post listsA studio blog's posts that first ran elsewhere: an Only syndicated Switch with a live count, rows with an outlet monogram and Read here and Read original links, and a canonical-link note.
- Pro
Tabbed Inbox Notification Blog
Subscribe and alertsA post-alert inbox: All and Unread tabs with counts, rows with an unread dot that clears when opened, a Mark all read button and an unread count in the header, all derived from the rows.
- Pro
Period Toggle Stats Blog
Stats and draftsA blog's own numbers: a 7, 30 or 90 day toggle swaps a strip of four figures and five ranked top posts with bars; the rows stay in place and take whichever post holds each rank.