# Thumbs pour

Feedback thumbs that fill like a glass, with a meniscus that sloshes and settles, and reasons that unfurl after a thumbs down.

Also called: thumbs up animation, animated feedback buttons.

Example: Feedback that fills. Rate the answer: ink pours into the thumb and settles; a thumbs down unfurls reasons beside it. Preview: https://chatcn.dev/preview/thumbs-pour-demo

Pick a thumb and ink pours into its outline from the bottom. The surface is a meniscus, two sine waves that slosh hardest mid pour and settle flat as it reaches the top, while the thumb gives a small nod. Change your mind and it drains. A thumbs down then unfurls a few reasons beside it; picking one folds them into a short thanks.

## Installation

```bash
npx shadcn@latest add https://chatcn.dev/r/thumbs-pour.json
```

## Usage

```tsx
import { ThumbsPour } from "@/components/ui/chatcn/thumbs-pour"

<ThumbsPour onValueChange={(v) => rate(message.id, v)} onReason={(r) => note(message.id, r)} />
```

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `value` / `defaultValue` | `"up" | "down" | null` | Pressing the chosen thumb again clears it |
| `onValueChange` | `(value) => void` |  |
| `reasons` | `string[]` | Offered after a thumbs down. `[]` skips asking |
| `onReason` | `(reason: string) => void` |  |
| `thanks` | `string` | Default "Thanks, noted" |

## Accessibility

- `aria-pressed` thumbs named "Good response" and "Bad response".
- The reasons are a labelled group; the thanks is a polite status.

## Motion

- The liquid is one clipped SVG path redrawn per frame for 760 ms (420 ms to drain).
- Reasons slide in from the thumb, 45 ms apart, 260 ms each.

Under reduced motion: the thumb fills at once and reasons fade in.

Source: https://chatcn.dev/docs/components/thumbs-pour