Dot Pagination
Page on and the lit stretch of dots reaches for the new page, its back end following a beat later; hovering lights a faint preview. The first and last pages stay put, the ones round the current page slide, and the number of items never changes, so nothing jumps under the pointer. Pages can be real links, so they're crawlable and open in a new tab.
Needs: None. Plain markup and a row of dots.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| count | number | required | Number of pages. |
| page | number | – | Controlled page, from 1. Leave unset to let it keep its own. |
| defaultPage | number | 1 | Page at first, when uncontrolled. |
| onChange | (page: number) => void | – | Called with the new page. |
| href | (page: number) => string | – | Make each page a real link. |
| siblings | number | 1 | Pages shown either side of the current one. |
| boundaries | number | 1 | Pages always shown at each end. |
| tone | string | – | The lit dots' colour. The text colour by default. |
| pitch | number | 5 | Distance between strip dots, px. |
| label | string | "Pagination" | What the navigation is called, for screen readers. |
| className | string | – | Class on the nav. |
| style | CSSProperties | – | Style on the nav. |