Pagination pages through a long list: previous and next buttons, the first and last pages, the pages around the current one, and an ellipsis for the rest. The number of buttons stays the same wherever you are, so the row keeps its width. Pass total pages, or count items and perPage. See the web Pagination for the browser version.
Without page, Pagination keeps its own state, starting at defaultPage.
Pass page and onChange to own the state, as server-side paging needs. perPageOptions adds a page-size select; when the size changes, the page moves so the first item on screen stays on screen.
- On a phone, siblings={0} keeps the row to one line on most screens. The row wraps when it does not fit.
- The page-size select is a native Select, labelled with labels.perPage inside the field, and opens a bottom sheet.
- Page buttons are named "Page 3" and the current one is announced as selected, in place of aria-current="page". There is no nav landmark, so there is no aria-label.
- Focus does not move back to the current page when an arrow disables itself at either end.