Dot Countdown
Days (while there are any), hours, minutes and seconds in the 5 x 7 face, each digit rolling down as it changes and flashing the accent, the colons blinking with the seconds, ticking on the clock's own second. At zero the count flashes and onDone is called. It's a timer to screen readers, labelled with the time left.
Needs: None. Canvas 2D.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| to | Date | number | string | required | The moment it counts down to. |
| onDone | () => void | – | Called once when it reaches zero. |
| units | boolean | true | Names under each pair of digits. |
| tone | string | – | The colour digits flash as they change. The page's accent by default. |
| pitch | number | 4 | Size of one dot in px. |
| label | string | "Time left" | What it counts down to, for screen readers. |
| className | string | – | Class on the countdown. |
| style | CSSProperties | – | Style on the countdown. |