103
Write a poll right in the thread, then watch it fill: bars spring to their share as votes land, your pick stays marked, and closing it locks in the winner.
akapoll·vote·survey
Run this in any project set up for the shadcn CLI. It copies the Live Poll source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/live-poll.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { LivePoll } from "@/components/live-poll";
export default function Page() {
return <LivePoll />;
}A free React component in the Together collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Live Poll source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| defaultPoll | Poll | — |
| defaultVote | string | null | null |
| simulateCrowd | boolean | false |
| you | string | "You" |
| onVote | (optionId: string) => void | — |
| onClose | (poll: Poll) => void | — |
| className | string | — |