Pagination

Important notice: The pagination component will not remove pages from the index if it overflows. Please trtuncate your array before sending it into list parameter.

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

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.

Parameters (Blade)

Key Default value Type Available values Description
[] array - Array with pages
1 integer - current page as index number
--is-active string - The current classname
nav string - The tag for the component
ul string - List element tag
li string - List item tag
?pagination= string - Pagination uses a link prefix on prev next buttons before the numeric index, add it here.
string - Adds the ability to add an anchor tag in the end of every link.
false string - -
false string - -
false boolean - If the item should use default JS to supply pagination
false boolean - When useJS is true, this option randomize the order of the items.
10 integer - How many items per page
false boolean - Maximum amount of pages
filled string - The style of button to display
sm string - Size of the buttons
false boolean - Amount of pages that is shown to the user at one time.
false boolean - -
string - The DOM id of the component.
[] array - Array containing wrapping classes array
[] array - Array containing keys and values rendered as attributes

Parameters (CSS)

Key Default value Type Available 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.