Sand Timer, animated React component
A session timer drawn as a real hourglass: every grain is simulated on a canvas, piling, sliding and funneling through the neck at exactly the rate the time runs out. Pressing the button turns the glass over.
- Pro
- Loaders
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Session ends in0:30
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| seconds | number | 30 | How long a full glass takes to run out, in seconds. The readout counts down from the same value. |
| autoplay | boolean | false | Turns the glass over by itself when the top is nearly empty, until someone presses the button. |