# Pagination A pagination with page navigation, next and previous links. ## Installation Start from a Svelte 5 application, then install the component package, shared theme, and Bits UI peer: ```bash pnpm add coss-svelte @coss-svelte/theme bits-ui ``` Import `@coss-svelte/theme/style-coss.css` after Tailwind from the application's global stylesheet. ## Usage ```svelte 1 2 3 ``` ## Anatomy - `Pagination` - `PaginationContent` - `PaginationEllipsis` - `PaginationItem` - `PaginationLink` - `PaginationNext` - `PaginationNextButton` - `PaginationPage` - `PaginationPrevious` - `PaginationPrevButton` ## API Reference ### Pagination A pagination with page navigation, next and previous links. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `bind:page` | `number` | `2` | Current page. Bind with `bind:page`. | | `pages` | `number` | `5` | Total number of pages to render when count is not provided. | | `count` | `number` | `totalPages` | Total item count used to calculate pagination. | | `perPage` | `number` | - | Items per page used with count to calculate page totals. | **Composition and refs** - `children: Snippet<[PaginationSnippetProps]>` - `bind:ref: HTMLElement \| null` Inherits from [Bits UI Pagination.Root](https://bits-ui.com/docs/components/pagination#root). ### PaginationContent Wraps the primary content for the parent component. **Composition and refs** - `children: Snippet<[]>` Inherits from [Svelte