Components
Toggle sidebar

Pagination

Display a series of buttons to navigate through a list of items.

Copy to clipboard
import { Pagination } from '@fluxui-dev/react';// orders: Order::paginate(), passed as a page prop<Pagination paginator={orders} />

Simple paginator

Use the simple paginator when working with large datasets where counting the total number of results would be expensive. The simple paginator provides "Previous" and "Next" buttons without displaying the total number of pages or records.

Copy to clipboard
// orders: Order::simplePaginate(), passed as a page prop<Pagination paginator={orders} />

Large result set

When working with large result sets, the pagination component automatically adapts to show a reasonable number of page links. It shows the first and last pages, along with a window of pages around the current page, and adds ellipses for any gaps to ensure efficient navigation through numerous pages.

Copy to clipboard
// orders: Order::paginate(5), passed as a page prop<Pagination paginator={orders} />

Scroll to top

Use the scrollTo prop to scroll the page when a pagination button is clicked. By default, it scrolls to the body element.
Copy to clipboard
<Pagination paginator={orders} scrollTo />
You can also target a specific element by passing a CSS selector.
Copy to clipboard
<Pagination paginator={orders} scrollTo="#table" />

Paging in the browser

Pass onPageChange to handle page changes yourself, such as for data that's already loaded, and build the paginator from your own state.

Copy to clipboard
import { useState } from 'react';const [page, setPage] = useState(1);<Pagination    paginator={{ current_page: page, last_page: 10, total: 95, from: (page - 1) * 10 + 1, to: Math.min(page * 10, 95) }}    onPageChange={setPage}/>

Reference

Pagination

Prop
Description
paginator
The paginator to display: what Laravel's paginate(), simplePaginate(), or cursorPaginate() returns, or an API resource collection of one. Page links navigate through the link registered in FluxProvider.
onPageChange
Callback fired with the page number when a page button is clicked, instead of following the paginator's URLs. Ignored for cursor paginators.
scrollTo
Scroll to an element when a pagination button is clicked. Pass a CSS selector to target a specific element. Default: body.
className
CSS classes applied to the pagination's root element.
Attribute
Description
data-flux-pagination
Applied to the root element for styling and identification.
Copyright © 2026 Wireable LLC ·Terms of Service
Built with by
Caleb Porzio and Hugo Sainte-Marie