Pagination

Pagination is used for splitting data up into multiple pages.

import {Pagination} from "@nulogy/components";

<Pagination currentPage={2} totalPages={5} />

Props

NameTypeDefaultDescription

currentPage

number

Required

The currently active page.

totalPages

number

Required

The total number of pages to show pagination for.

onNext

function

null

The function to run when the next button is clicked.

onPrevious

function

null

The function to run when the previous button is clicked.

onSelectPage

function

null

The function to run when a page number is clicked.

nextLabel

string

Next

The next button label

previousLabel

string

Previous

The previous button label

nextAriaLabel

string

Next

The next button's aria label

previousAriaLabel

string

Previous

The previous button's aria label

aria-label

string

Pagination navigation

Aria label that describes the pagination navigation