- components
- ›
- pagination
- ›
- react
Pagination
Navigate between multiple pages of content.
| ID | Name | Country | |
|---|---|---|---|
| 1 | Taylor Marvin | Jake.Romaguera97@yahoo.com | French Guiana |
| 2 | Stewart Mante | Kirsten.Crooks@yahoo.com | Saint Kitts and Nevis |
| 3 | Otis Haag | Estefania82@gmail.com | Austria |
| 4 | Mandy Bartell | Randal_Dach@yahoo.com | Brazil |
| 5 | Dan Schowalter | Neil_Robel@yahoo.com | Sudan |
| 6 | Santos Towne | Maryse68@yahoo.com | South Sudan |
| 7 | Charlotte Kihn | Ayana_Lehner@yahoo.com | Kuwait |
| 8 | Abraham Olson | Amalia.Breitenberg@yahoo.com | Trinidad and Tobago |
| 9 | Marsha Roberts | Lera_Schoen68@gmail.com | Cocos (Keeling) Islands |
| 10 | Elmer Pfannerstill | Aaron.Nikolaus@hotmail.com | Romania |
Page Size
| ID | Name | Country | |
|---|---|---|---|
| 1 | Frank Emmerich | Aisha_Olson3@gmail.com | Guinea-Bissau |
| 2 | Woodrow Gulgowski | Carolanne_Lemke@hotmail.com | French Polynesia |
| 3 | Spencer Heathcote | Victoria_Ratke55@hotmail.com | Poland |
| 4 | Nicolas Weimann | Jayson63@hotmail.com | Paraguay |
| 5 | Dr. Brendan Hudson | Angie9@yahoo.com | Antarctica |
| 6 | Ms. Inez Johns Jr. | Trenton_Renner-Dare@yahoo.com | Namibia |
| 7 | Dr. Orlando Lehner | Jodie_Dare73@gmail.com | Togo |
| 8 | Arturo Howell | Zita.Fritsch@yahoo.com | Vanuatu |
| 9 | Mrs. Priscilla Kirlin | Deborah86@hotmail.com | Turkey |
| 10 | Ryan Koelpin | Myrtie.Kovacek@yahoo.com | Northern Mariana Islands |
Direction
| ID | Name | Country | |
|---|---|---|---|
| 1 | Genevieve O'Hara | Anita.Barton@yahoo.com | Trinidad and Tobago |
| 2 | Jesse Kilback | Loren_Block15@hotmail.com | Tuvalu |
| 3 | Hannah Dibbert | Hettie33@hotmail.com | Greenland |
| 4 | Ramona Watsica | Estevan93@hotmail.com | Spain |
| 5 | Ms. Glenda Gerhold | Hallie.Jenkins@yahoo.com | Congo |
| 6 | Angel Beer | Albina_Grimes@hotmail.com | South Georgia and the South Sandwich Islands |
| 7 | Derrick Pouros | Luella_Moore@gmail.com | Thailand |
| 8 | Angelina Yost | Daisy_Rippin23@gmail.com | Tuvalu |
| 9 | Genevieve Fritsch | Durward.Towne56@hotmail.com | Netherlands |
| 10 | Wanda Weimann MD | Donald_Shanahan30@gmail.com | El Salvador |
Total Count
For server-side pagination, your data source may be truncated. Make sure to specify the total records using count.
{ "data": [...], "pagination": { "page": 1, "limit": 10, "count": 500, }}<Pagination page={response.pagination.page} count={response.pagination.count} pageSize={response.pagination.limit}> ...</Pagination>API Reference
Root
inline-flex gap-2 p-2 rounded-container preset-outlined-surface-200-800 w-fit| Property | Default | Type |
|---|---|---|
ids | - | Partial<{ root: string; ellipsis: (index: number) => string; prevTrigger: string; nextTrigger: string; item: (page: number) => string; }> | undefined The ids of the elements in the accordion. Useful for composition. |
translations | - | IntlTranslations | undefinedSpecifies the localized strings that identifies the accessibility elements and their states |
count | - | number | undefinedTotal number of data items |
pageSize | - | number | undefinedThe controlled number of data items per page |
defaultPageSize | 10 | number | undefinedThe initial number of data items per page when rendered. Use when you don't need to control the page size of the pagination. |
siblingCount | 1 | number | undefinedNumber of pages to show beside active page |
page | - | number | undefinedThe controlled active page |
defaultPage | 1 | number | undefinedThe initial active page when rendered. Use when you don't need to control the active page of the pagination. |
onPageChange | - | ((details: PageChangeDetails) => void) | undefinedCalled when the page number is changed |
onPageSizeChange | - | ((details: PageSizeChangeDetails) => void) | undefinedCalled when the page size is changed |
type | "button" | "button" | "link" | undefinedThe type of the trigger element |
getPageUrl | - | ((details: PageUrlDetails) => string) | undefinedFunction to generate href attributes for pagination links. Only used when `type` is set to "link". |
dir | "ltr" | "ltr" | "rtl" | undefinedThe document's text/writing direction. |
getRootNode | - | (() => ShadowRoot | Node | Document) | undefinedA root node to correctly resolve document in custom environments. E.x.: Iframes, Electron. |
element | - | ((attributes: HTMLAttributes<"nav">) => Element) | undefinedRender the element yourself |
RootProvider
| Property | Default | Type |
|---|---|---|
value | - | PaginationApi<PropTypes> |
element | - | ((attributes: HTMLAttributes<"nav">) => Element) | undefinedRender the element yourself |
RootContext
| Property | Default | Type |
|---|---|---|
children | - | (pagination: PaginationApi<PropTypes>) => ReactNode |
PrevTrigger
btn preset-tonal| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"button">) => Element) | undefinedRender the element yourself |
Item
btn preset-tonal cursor-pointer select-none data-selected:preset-filled| Property | Default | Type |
|---|---|---|
type | - | "page" |
value | - | number |
element | - | ((attributes: HTMLAttributes<"a">) => Element) | undefinedRender the element yourself |
Ellipsis
btn preset-tonal pointer-events-none| Property | Default | Type |
|---|---|---|
index | - | number |
element | - | ((attributes: HTMLAttributes<"span">) => Element) | undefinedRender the element yourself |
NextTrigger
btn preset-tonal| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"button">) => Element) | undefinedRender the element yourself |