Pagination

Page navigation control with prev/next buttons and page numbers. Wraps bits-ui Pagination.

Example

...

Current page: 1

Props

PropTypeDefaultDescription
countnumberTotal number of items
perPagenumber10Items per page
pagenumber1Current page (bindable)
onPageChange(page: number) => voidCalled when page changes
siblingCountnumber1Number of sibling pages shown around current
classstringAdditional CSS classes

Usage

<script>
  import { Pagination } from '@chrissnell/chonky-ui';

  let page = $state(1);
</script>

<Pagination count={50} perPage={10} bind:page />