Pagination

The Pagination component provides a reusable pattern for pagination in the interface.

Pagination

Basic pagination with 15 pages, demonstrating overflow ellipsis indicators when the list exceeds five visible items.

Using JS

With just a few added attributes you can have pagination made for you, including keepDOM, pagesToShow, and randomizeOrder options.

Simple pagination

Showing all pages in the pagination at the same time.

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9

Async rendered pagination items

Items are injected into the pagination container after initialization using script.

Pagination with pagesToShow attribute.

Takes an even number (or closest even number) and only show that amount of pages (in addition to the current page).

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9

Pagination with pagesToShow attribute.

Takes an even number (or closest even number) and only show that amount of pages (in addition to the current page).

Item 8
Item 9
Item 3
Item 4
Item 5
Item 1
Item 2
Item 6
Item 7

Small list

Pagination with four pages and a static active page — no overflow or ellipsis indicators are shown when the total fits within the visible window.

Button size: medium

Pagination rendered with medium-sized buttons using buttonSize 'md', producing wider page-number buttons than the default small size.

Button size: large

Pagination rendered with large-sized buttons using buttonSize 'lg', producing the widest page-number buttons in the available size scale.

Button style: outlined

Pagination using outlined button style, giving page buttons a bordered appearance instead of the default filled background.

Button style: basic

Pagination using basic button style, rendering page buttons without fill or border for a minimal, text-only appearance.

API

Parameter Default Type Description
[] array -
1 integer -
--is-active string -
nav string -
ul string -
li string -
?pagination= string -
string -
false string -
false string -
false boolean -
false boolean -
10 integer -
false boolean -
filled string -
sm string -
false boolean -
false boolean -
false boolean -

CSS API

Variable Default Type Values Description
var(--base) range - Main unit that drives radius and spacing scales.
var(--space) range - Base spacing unit. Used for padding and margin inside components.