Dot Reading Progress
A row of dots across the top fills in the accent as you read, its leading edge a stipple. Each section's start is a brighter dot: point at it to see the heading, press it to go there. It can say how many minutes are left, and follows the page's scroll or any scrolling box it's put in.
Needs: None. One thin canvas.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| target | RefObject<HTMLElement> | required | The article being read. |
| scroller | RefObject<HTMLElement> | – | The scrolling box, when it isn't the page. Put the bar inside it, first. |
| headings | string | "h2" | Which headings mark sections. Empty for none. |
| readout | boolean | false | "4 min left" under the right end. |
| wpm | number | 230 | Reading pace for the readout. |
| offset | number | 0 | Height of a fixed header above it, px. |
| tone | string | – | The read part's colour. The page's accent by default. |
| pitch | number | 4 | Size of one dot, px. |
| label | string | "Reading progress" | For screen readers. |
| className | string | – | Class on the bar. |
| style | CSSProperties | – | Style on the bar. |