A very simple pagination library for svelte.
npm install svelte-simple-pagination
import Pagination from 'svelte-simple-pagination'
<Pagination active={10} numpages={50} limit={10} />
<Pagination active={10} numpages={50} limit={10} prevLabel="before" nextLabel="after" />
<Pagination active={10} numpages={50} limit={10} prevLabel={null} nextLabel={null} />
<Pagination active={10} numpages={50} limit={10} customClass="pagination-lg" />
<Pagination active={10} numpages={50} limit={10} customClass="pagination-sm" />
Comes with tests out of the box using svelte-testing-library + Jest.
To Run tests:
npm test # or yarn
To serve development build:
npm run storybook
To build static storybook site (default output folder is /docs for easly sharing on github pages):
npm run build-storybook