KQ-889 · POLL/CARD/CHAT

Chat Poll

A poll sent into a thread, with the counts public from the first glance: every bar is already drawn, and every one re-flows the moment you vote, because your vote joins the total and drops everyone else's share. Bars take their new width on glide with a cascade delay so the re-flow reads top to bottom, the total rolls beneath on the same spring, and the leading rail travels between rows on snap through a useId-prefixed layoutId. The rows are a real radiogroup: arrows move focus without spending a vote, Home and End jump, Space or Enter casts, and pressing your own row again withdraws it.

KQ-889 · POLL/CARD/CHAT
  1. When should Friday's collection run?

    11votesCloses 17:00
    14:08

not voted · 11 votes · 12:30, after the morning run leads

Install

One command — the source lands in your repo. Or copy it from the Code tab.

$ pnpm dlx shadcn@latest add @kinetiq/poll-card-chat

Props

poll
ChatPoll
default
The poll message: id, side, question, options with their votes, time, delivery and a closing note.
value / defaultValue
string | null
default null
Controlled or initial id of the reader's own vote.
onVote
(id: string | null, previous: string | null) => void
default
Fires from the press or key that casts, moves or withdraws a vote.
allowChange
boolean
default true
Lets the reader move or withdraw a vote after casting it.
closed
boolean
default false
Locks the rows, keeps the winner lit and lets the rest fall back.
format
(votes: number) => string
default
Formats every count and the rolling total; defaults to en-US thousands.
peerName
string
default "Them"
Names the sender in the delivery sentence.
label
string
default "Thread"
Names the thread list for assistive technology.