Pagination

Select a page from a range, or with "next" and "previous" controls.

The Pagination component has no restrictions on what type of data or visuals it is used with since it strictly handles the visual enumeration and controls based on totalItemCount and itemsPerPage values.

Pagination includes an onChange event that emits the updated page number which can then be used to alter the data displayed.

The Pagination component will not display if the totalItemCount is less than the count needed to create more than one page.

Expanded Pagination

The default variant for Pagination is expanded which means a list of buttons to navigate between available pages will be displayed and is recommended for large datasets.

The only required property is totalItemCount which will be used with the default itemsPerPage of 10 to calculate the total number of pages.

In the live demo below, you can experiment with updating the itemsPerPage values as well as the activePage to see how it affects the display of data.

User Controlled itemsPerPage

You may provide an additional control to allow the user to update the itemsPerPage.

The following shows how to associate a control for updating the number of items displayed within the pagination list. The placement and type of control should be determined based on your implementation context.

Basic Pagination

Use of variant="basic" is recommended for short datasets, generally less than 50 items which equates to 5 pages using the default itemsPerPage of 10.

Basic Pagination offers simple "previous" and "next" controls with a dynamically updating label that is also announced via aria-live.

Properties