Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Pagination

Move through pages while the application owns the data.

Preview

Live preview

Changes apply to this preview only.

page 4of 20

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Sizes

Enumerated from paginationVariantMap: sm, md and lg.

Open preview

Few pages and labels

With five pages there is no ellipsis; the arrow labels can be localised.

Open preview

Examples

A result footer normally pairs the pagination with a count.

Open preview

Usage

Update the displayed dataset when the selected page changes; the control does not fetch data.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluPaginationProps

Type source
PimoluPaginationProps public API
NameTypeDefaultDescription
pagenumber | undefined—Controlled current page, starting at 1.
defaultPagenumber | undefined1Initial page when uncontrolled. Defaults to 1.
pageCountRequirednumber—Number of pages.
onPageChange((page: number) => void) | undefined—Public Pimolu prop; see the source declaration for details.
siblingCountnumber | undefined1Pages shown on each side of the current page. Defaults to 1.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
previousLabelstring | undefined"Previous page"Accessible name of the previous button.
nextLabelstring | undefined"Next page"Accessible name of the next button.
size"sm" | "md" | "lg" | undefined"md"Button size. Defaults to "md".
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLElement> | undefined—Standard React/HTML attribute.
page

number | undefined

No default extracted.

Controlled current page, starting at 1.

defaultPage

number | undefined

Default: 1

Initial page when uncontrolled. Defaults to 1.

pageCountRequired

number

No default extracted.

Number of pages.

onPageChange

((page: number) => void) | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

siblingCount

number | undefined

Default: 1

Pages shown on each side of the current page. Defaults to 1.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

previousLabel

string | undefined

Default: "Previous page"

Accessible name of the previous button.

nextLabel

string | undefined

Default: "Next page"

Accessible name of the next button.

size

"sm" | "md" | "lg" | undefined

Default: "md"

Button size. Defaults to "md".

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Name pagination, expose the current page and keep disabled boundaries non-operable.
Read the accessibility guide →