shadcn.io is not affiliated with official shadcn/ui
Vote Board Roadmap Blog Block for React
Upcoming posts as numbered rows: a vote toggle with a rolling count, the title and what it will argue, and a drawn four-segment stage meter from Researching to Scheduled.
Installation
Overview
A content roadmap for React with Base UI, written for Foresail, a product-strategy blog. A start-aligned header and a legend band sit over four upcoming posts as numbered rows. Each row starts with a vote Toggle (an arrow over the count, which rolls up by one when you vote and back when you take the vote back), then the title, one line on what the post will argue and the author, then a drawn stage meter: four segments, solid as far as the post has got (Researching, Drafting, Editing, Scheduled), with the stage in words under it. A scheduled post shows its fixed publish date. It's built from Toggle, SlidingNumber and Guides. The votes are example data and live in this page only.
FAQ
Where do my votes go?
Nowhere: a vote only adds one to that row's shown count in the page, and "You voted for 2 of 4" counts them. A reload brings the counts back. To make it real, send the toggle's change to your server and store it against the signed-in reader.
How does the vote button work?
Each vote is a Toggle named "Vote for" and the post's title, with the current count in its name. Pressing it fills it with the foreground colour and the number rolls up by one; pressing it again undoes it.
The toggle takes pressed and onPressedChange.
How is the stage shown without colour?
The four segments are all the same colour family: reached ones are solid foreground, the rest a neutral track, so progress reads as weight. The stage is also written under the meter ("Drafting, stage 2 of 4"), and the legend band names all four, so no information depends on the drawing.
How do I change the posts or the stages?
Edit POSTS and STAGES at the top of the file. A post's stage is an index into STAGES; give a scheduled post an ISO date, formatted in UTC, and the row shows "Scheduled for" and that date.
Related
- Pro
Drafts Desk Blog
Stats and draftsA drafts list for a writing-tools blog: each row has a status badge, a progress bar with its word count, the fixed time it was edited and a menu to edit, duplicate or archive it.
- Pro
Reader Poll Blog
Reader feedbackA reader poll in a split: a RadioGroup of four choices and a Vote button at the start, result bars with percentages, vote counts and a total at the end, and a Change vote button that takes your vote back.
- 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
Agenda Schedule Blog
Archives by dateA newsroom's upcoming posts as an agenda grouped by day, with a Select that shows every time in UTC, New York or Tokyo, in place.
- Pro
Author Leaderboard Blog
Authors and staffSix writers ranked by posts with a bar, a count and twelve weekly streak dots, and a This year / All time toggle that changes the figures and the order.
- Pro
Notes From The Desk Changelog Blog
Story formatsThe publication's own changes written as posts: entries with a large version numeral and date at the start, grouped Added, Changed and Fixed lists, and Show earlier notes in a Collapsible.