# Done bell

A bell that rings once when a long run finishes, with a real swing and a count on its shoulder.

Also called: run finished bell, task done bell.

Example: A bell that rings once. When a long run finishes the bell swings from its hook with a real decay, the clapper a beat behind, sound rings leave its sides and the count lands on its shoulder. Preview: https://chatcn.dev/preview/done-bell-demo

When the count goes up the bell swings once from its hook, each swing about 60% of the last, the clapper a beat behind the shell. Two sound rings leave its sides and it glows amber for the length of the ring. The count lands on its shoulder; later counts pop the badge. Nothing loops: one ring per thing that finished.

## Installation

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

## Usage

```tsx
import { DoneBell } from "@/components/ui/chatcn/done-bell"

<DoneBell count={unseen} onClick={openRuns} />
```

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `count` | `number` | Going up rings the bell |
| `label` | `string` | For the name: "finished runs" |

## Accessibility

- A button named with the count; the badge is hidden from screen readers.

## Motion

- A 1.1 s decaying swing with the clapper offset by a quarter swing. Reduced motion: only the colour changes.

Source: https://chatcn.dev/docs/components/done-bell