Pagination - Skeleton

  1. components
  2. pagination
  3. react

Pagination

Navigate between multiple pages of content.

PositionNameWeightSymbol
1Hydrogen1.0079H
2Helium4.0026He
3Lithium6.941Li
4Beryllium9.0122Be
5Boron10.811B

Alternative UI

Display an alternative interface using the alternative property.

1 - 31 of 2

Handling Total Count

If your source data is pre-truncated (ex: server-side pagination). Make sure to specify the total item count.

// Mock Server Response
pagination: {
"page": 1,
"limit": 2,
"pages": 1,
"total": 1, // <----
"next": null,
"prev": null
}
<Pagination count={pagination.total} ... />

API Reference

Pagination

Property Type Description
data *
Provide source data as an array.
count
number
Total number of data items. Required for server-side pagination.
alternative
boolean
Enables alternative display with stats and first/last buttons.
textSeparator
string
Set the separator text or character, such as "of" in "X of Y".
showFirstLastButtons
boolean
Show first and last page button.
titleFirst
string
Set an optional title for the first button.
titlePrevious
string
Set an optional title for the previous button.
titleNumeral
string
Set an optional title for the numeral buttons (ex: Page 1).
titleNext
string
Set an optional title for the next button.
titleLast
string
Set an optional title for the last button.
base
string
Sets base classes for the list.
background
string
Sets background classes for the list.
border
string
Sets border classes for the list.
gap
string
Sets gap classes for the list.
padding
string
Sets padding classes for the list.
rounded
string
Sets border radius classes for the list.
classes
string
Provide arbitrary CSS classes for the root.
buttonBase
string
Sets base classes for buttons.
buttonActive
string
Sets active state classes for buttons.
buttonInactive
string
Sets inactive state classes for buttons.
buttonHover
string
Sets hover state classes for buttons.
buttonClasses
string
Provide arbitrary CSS classes for buttons.
labelFirst
ReactNode
Set button icon or label for first button.
labelPrevious
ReactNode
Set button icon or label for previous button.
labelEllipsis
ReactNode
Set button icon or label for ellipsis.
labelNext
ReactNode
Set button icon or label for next button.
labelLast
ReactNode
Set button icon or label for last button.
ids
The ids of the elements in the accordion. Useful for composition.
translations
Specifies the localized strings that identifies the accessibility elements and their states
pageSize
number
Number of data items per page
Default: 10
siblingCount
number
Number of pages to show beside active page
Default: 1
page
number
The active page
Default: 1
onPageChange
Called when the page number is changed
onPageSizeChange
Called when the page size is changed
type
"button" | "link"
The type of the trigger element
Default: "button"
dir
"ltr" | "rtl"
The document's text/writing direction.
Default: "ltr"
getRootNode
A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.