# Poll card

A question to vote on; after voting it shows each option's share. PlankUI component for React 19 and Tailwind CSS v4. Category: Blocks.

## Install

```bash
npx plankui@latest add poll-card
```

## Usage

```tsx
import { PollCard } from "@/components/ui/poll-card";

<PollCard question="What should we build next?" options={[{ id: "api", label: "Public API", votes: 22 }]} onVote={save} />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| question | `string` | `required` | What people vote on. |
| options | `{ id, label, votes }[]` | `required` | The choices and their votes so far. |
| onVote | `(id: string) => void` |  | Called with the chosen option. |
| voted | `string` |  | Show results at once, for someone who already voted. |
| note | `ReactNode` |  | A line under the results. |

Source: https://github.com/VectorLabsHQ/plankui/blob/main/components/ui/poll-card.tsx
