shadcn.io is not affiliated with official shadcn/ui
Consensus Voting Comments Block for Solid
A proposal with Approve, Concerns and Block cells, a rule you can switch between simple majority, two of three and everyone, and a verdict worked out live from the counts.
Installation
Overview
Record where a team stands before a decision is made, with this consensus voting comment block for Solid with Ark UI. A compact header names the decision. The frame opens with the proposal (Move standups to 09:30), a rule row with a Segment Group (Simple majority, Two of three, Everyone), and three stance cells on shared hairlines. Each cell, Approve, Concerns or Block, shows a large count and the initials of the people who chose it, and you choose yours with a native radio inside the cell. A Block needs a one-line reason in an Input first. The one primary Shine Button casts or changes your vote, the counts move, a strip of seven segments fills as approvals arrive, and the verdict is worked out from the counts and the rule: Passes: 4 of 7 approve, Needs 1 more approval, or Blocked by 1: resolve the concern. It is built from Segment Group, Input, Shine Button, Field and Guides, with CSS only. For team decisions, RFC sign-off and working agreements.
FAQ
How do I use my own voters and rules?
Edit VOTERS (each has an id, initials, a name and the seed stance they already cast) and RULES (each has a label and the number of approvals it needs out of all voters). DECISION holds the proposal. Counts, the verdict, the progress strip and the status sentence are all worked out from those.
How is the verdict decided?
Any Block wins first: the verdict says it is blocked and to resolve the concern, whatever the approvals. Otherwise the proposal passes when approvals reach what the rule needs, and until then it says how many more approvals it needs. Concerns count as neither an approval nor a block, which keeps them visible without stopping the proposal.
Why does Block need a reason?
Because stopping other people should cost a sentence. Choosing Block enables the reason field; casting without one is refused with a message and focus goes to the field. The reason is kept in the page but not shown to the others here; a real app would show it beside the Block.
What stays local?
Your vote, the rule and the reason live in the page; the other six votes are typed. Nothing is saved or sent. To make it real, store one vote per person, return the full tally from the server so everyone sees the same counts, and enforce who may change the rule.