# Vote Button

A chevron over a count. Voting inverts the tile and rolls the count up by one.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/vote-button
```

## Usage

```tsx
import { VoteButton } from '@/components/fetaui/vote-button'

export function Example() {
  return <VoteButton count={128} label="Vote for dark mode" />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| count | number | required |
| label | string | required |
| voted | boolean |  |
| defaultVoted | boolean | false |
| onVotedChange | (voted) => void |  |
| disabled | boolean | false |
| animated | boolean | true |

## When to use

- On lists people rank together, like feature requests.

## When not to use

- For a like with no ranking: use Toggle.

## Accessibility

- A toggle button with aria-pressed.
- The name says what the vote is for and gives the current count.

## Motion

- The tile inverts in 120 ms and digits roll to the new count.
- Press scales to 0.98.
- With reduced motion, digits swap and there is no press scale.
