A compact pager that truncates long ranges with an ellipsis.
Page 1 of 10
Copy the command below and run it in your terminal.
bunx @sivir/ui add pagination
pnpm dlx @sivir/ui add pagination
npx @sivir/ui add pagination
yarn dlx @sivir/ui add pagination
Import the Pagination component and use it:
import { Pagination } from '$lib/sivir/components/pagination'; let page = $state(1); <Pagination bind:page total={20} />
Tune how many pages surround the current one.