# Pagination (@limerdev/zest) Pages of a list: `` (`count`, `perPage`, `bind:page`, `siblingCount`) is a navigation landmark (`label`) that draws previous, the pages (the current one marked, gaps as an ellipsis) and next. The pages are buttons that change `page`; load the page's data when it changes. To draw it yourself, its `children` snippet gets the `pages`: a `Pagination.Content` list of `Pagination.Item`s, each a `Pagination.Page` or a `Pagination.Ellipsis`, between a `Pagination.PrevButton` and a `Pagination.NextButton`. - Category: Navigation - Import: `import { Pagination } from '@limerdev/zest'` - Bits UI: `Pagination`, https://bits-ui.com/docs/components/pagination - Exports: `Pagination.Root`, `Pagination.Content`, `Pagination.Item`, `Pagination.Page`, `Pagination.PrevButton`, `Pagination.NextButton`, `Pagination.Ellipsis` - Use for: Paging through a long list or table the app loads a page at a time. - Don't: A short list: show it all. Loading more as the user scrolls: a "Load more" `Button`. ```svelte ``` Props of `Pagination.Root`: - `count` (`number`, required): The total number of items to be paginated. - `label` (`string`, default `the Config's `strings.pagination`, else 'Pagination'`): The navigation landmark's name. - `loop` (`boolean`, default `false`): Whether keyboard navigation should loop back to the first or last page trigger when reaching either end. - `onPageChange` (`OnChangeFn`): A callback function called when the page changes. - `orientation` (`"horizontal" | "vertical"`, default `"horizontal"`): The orientation of the pagination component. Used to determine how keyboard navigation should work between pages. - `page` (`number`, default `1`, bindable): The current page number. - `perPage` (`number`, default `10`): The number of items per page. - `siblingCount` (`number`, default `1`): The number of visible items before and after the current page. Props of `Pagination.Page`: - `page` (`Page`, required) Props of `Pagination.Ellipsis`: - `label` (`string`, default `the Config's `strings.morePages`, else 'More pages'`): What the ellipsis stands for, for screen readers. Example: Basic 240 orders, 20 a page. Load the page's data when page changes. ```svelte

Orders {(page - 1) * 20 + 1}–{page * 20} of 240

``` Example: Your own layout The children snippet gets the pages and the range shown, to draw your own layout. ```svelte {#snippet children({ range })} {range.start}–{range.end} of 240 {/snippet} ```