components / pagination
pagination.
page navigation with boundary pages, a sibling window and ellipsis gaps, plus a compact prev/next variant. the window shifts rather than shrinking at the ends, so the control keeps a constant width as you page through it, and a gap that would elide exactly one page renders that page instead. the range logic ships as a separate tested module.
showing page 1 of 20
installation
bunx @justin06lee/chrome@latest add paginationprops
| name | type | default | description |
|---|---|---|---|
| page * | number | - | current page, 1-based. |
| pageCount * | number | - | total pages; 1 or fewer renders nothing. |
| onChange * | (page: number) => void | - | |
| siblings | number | 1 | pages shown either side of the current one. |
| boundaries | number | 1 | pages pinned at each end. |
| compact | boolean | false | prev/next with a '3 / 12' readout instead of numbers. |
| ariaLabel | string | 'pagination' | |
| className | string | - |