- components
- ›
- pagination
- ›
- react
Pagination
Navigate between multiple pages of content.
ID | Name | Country | |
---|---|---|---|
1 | Antoinette Predovic | Daija_Murray99@yahoo.com | Cook Islands |
2 | Javier Wolf | Ellis.Romaguera@hotmail.com | South Sudan |
3 | Dr. Blake Rohan | Kali_Nader40@hotmail.com | Mozambique |
4 | Ms. Leigh Hammes | Deangelo89@gmail.com | Jersey |
5 | Clinton Johns | Sarai.Ritchie@yahoo.com | Ecuador |
6 | Mr. Randy Mayer | Timmy14@hotmail.com | Aruba |
7 | Patrick Boyle | Damian.Heller@yahoo.com | Dominica |
8 | Rex Streich | Elijah7@hotmail.com | Palau |
9 | Colleen Senger | Cedrick92@hotmail.com | Cambodia |
10 | Lauren Schmeler | Nicholas.Langworth@yahoo.com | Cocos (Keeling) Islands |
Page Size
ID | Name | Country | |
---|---|---|---|
1 | Willard Kunde | Junius_Rice50@hotmail.com | Turks and Caicos Islands |
2 | Devin Heidenreich | Arjun.Rowe@yahoo.com | Barbados |
3 | Fannie Crooks III | Pearlie_Jacobs10@gmail.com | Austria |
4 | Clifton Dickens | Percival4@gmail.com | New Zealand |
5 | Vicky Bartoletti | Madisyn84@hotmail.com | Aland Islands |
6 | Andres Collier | Kylee.Wisozk@hotmail.com | France |
7 | Evan Hahn | Kristina.Balistreri@gmail.com | Myanmar |
8 | Gustavo Barrows | Amira.Wilkinson@hotmail.com | Belarus |
9 | Danielle Purdy | Isai.Auer@gmail.com | Martinique |
10 | Frankie Morissette | Peggie_Schowalter@gmail.com | Saint Pierre and Miquelon |
Direction
ID | Name | Country | |
---|---|---|---|
1 | Nora Torp | Cale46@gmail.com | Malaysia |
2 | Joseph Von | Mariela_Leffler@hotmail.com | Sierra Leone |
3 | Willis Dickinson | Ramiro.Haag84@hotmail.com | Luxembourg |
4 | Leona Ankunding | Isadore.Mueller68@gmail.com | Faroe Islands |
5 | Gladys Gerlach | Sophie_Bechtelar@hotmail.com | China |
6 | Dr. Troy Bogan | Rudy_Schamberger@yahoo.com | South Georgia and the South Sandwich Islands |
7 | Tricia Labadie | Tanya.Runolfsdottir96@yahoo.com | Saint Vincent and the Grenadines |
8 | Ms. Delores Bruen | Krista.Quigley@gmail.com | Croatia |
9 | Armando Thompson | Hattie_Schimmel54@hotmail.com | Uruguay |
10 | Vera Feil | Lexi_Breitenberg43@gmail.com | Jersey |
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
Ellipsis
btn preset-tonal pointer-events-none
Property | Default | Type |
---|---|---|
index | - | number |
element | - | ((attributes: HTMLAttributes<"span">) => 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 |
NextTrigger
btn preset-tonal
Property | Default | Type |
---|---|---|
element | - | ((attributes: HTMLAttributes<"button">) => Element) | undefinedRender the element yourself |
PrevTrigger
btn preset-tonal
Property | Default | Type |
---|---|---|
element | - | ((attributes: HTMLAttributes<"button">) => Element) | undefinedRender the element yourself |
RootProvider
Property | Default | Type |
---|---|---|
value | - | PaginationApi<PropTypes> |
element | - | ((attributes: HTMLAttributes<"nav">) => Element) | undefinedRender the element yourself |
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; }> | undefinedThe 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 |
RootContext
Property | Default | Type |
---|---|---|
children | - | (pagination: PaginationApi<PropTypes>) => ReactNode |