Pagination
Page navigation control with prev/next buttons and page numbers. Wraps bits-ui Pagination.
Example
...
Current page: 1
Props
| Prop | Type | Default | Description |
|---|---|---|---|
count | number | — | Total number of items |
perPage | number | 10 | Items per page |
page | number | 1 | Current page (bindable) |
onPageChange | (page: number) => void | — | Called when page changes |
siblingCount | number | 1 | Number of sibling pages shown around current |
class | string | — | Additional CSS classes |
Usage
<script>
import { Pagination } from '@chrissnell/chonky-ui';
let page = $state(1);
</script>
<Pagination count={50} perPage={10} bind:page />