prev / numbered / next row.

Live preview

Install

From your site folder, run:

jprot add Pagination

That downloads the self-contained component into theme/components/Pagination.js,

where it is picked up automatically — the same way as any built-in component.

To remove it later, just delete that file.

Use it as a homepage section

Add an entry to the sections: list in jprot.config.js:

sections: [
  { component: 'Pagination', title: 'Pagination' },
]

Use it inside a page

On its own line in any Markdown file, passing the props:

:::Pagination current=3 total=6 urlBase="/page"

Props

PropTypeNote
currentnumberactive page
totalnumberpage count
urlBasestringhref prefix (/page → /page/2)

↩ Back to all elements