- components
- ›
- pagination
- ›
- react
Pagination
Navigate between multiple pages of content.
ID | Name | Country | |
---|---|---|---|
1 | Jim Mraz | Darren.Lebsack@gmail.com | Nauru |
2 | Brittany Bogisich | Letha73@gmail.com | Pitcairn Islands |
3 | Patrick Hintz | Elise_Strosin90@gmail.com | Belarus |
4 | Cornelius Pfeffer | Ivah.Wilkinson9@yahoo.com | Trinidad and Tobago |
5 | Clifford Mills | Willow_Weimann@yahoo.com | Armenia |
6 | Herbert Wisoky | Brooklyn.Wehner51@hotmail.com | Japan |
7 | Lewis Harvey | Dewitt.Kuphal65@hotmail.com | Pitcairn Islands |
8 | Dr. Willie Oberbrunner | Lester4@hotmail.com | Serbia |
9 | Tara Bauch | Serena_Rutherford27@gmail.com | Gambia |
10 | Ms. Shannon Keeling | Yessenia.Friesen@hotmail.com | Sierra Leone |
Page Size
ID | Name | Country | |
---|---|---|---|
1 | Katherine Hoppe | Casper_Kulas91@yahoo.com | Guatemala |
2 | Dr. Hannah Leuschke MD | Forrest_Oberbrunner59@hotmail.com | Belgium |
3 | Janet Prosacco | Kaela62@gmail.com | Netherlands |
4 | Brandi Swift | Dagmar_Wisoky10@yahoo.com | Maldives |
5 | Mrs. Lorena Jerde | Ford.Jakubowski89@yahoo.com | Moldova |
6 | Julie Senger | Brody_Hoppe68@yahoo.com | Svalbard & Jan Mayen Islands |
7 | Jenny Wolf Sr. | Daphne.Wilkinson33@hotmail.com | Iraq |
8 | Suzanne Grant | Corbin_Howell@yahoo.com | American Samoa |
9 | Cary Keeling | Savanna.Gerhold57@hotmail.com | Uzbekistan |
10 | Warren Gulgowski Jr. | Dolly.Lemke@hotmail.com | Bouvet Island |
Direction
ID | Name | Country | |
---|---|---|---|
1 | Silvia Boyle | Cordie.Padberg25@yahoo.com | Qatar |
2 | Natalie Kerluke | Casimir.Ruecker74@hotmail.com | Comoros |
3 | Roosevelt Kreiger I | Aiyana_Hammes@yahoo.com | Grenada |
4 | Sherman Oberbrunner | Sophia.Beahan@hotmail.com | Libyan Arab Jamahiriya |
5 | Jeannie Erdman | Madonna_Becker@gmail.com | Nauru |
6 | Kyle Runolfsdottir | Unique92@yahoo.com | Iceland |
7 | Miriam Hermann | Claudie0@yahoo.com | Iraq |
8 | Chad Jacobi | Al_Swaniawski@hotmail.com | Saint Pierre and Miquelon |
9 | Michael Smitham-Wuckert | Jaime65@gmail.com | Zimbabwe |
10 | Kelly Herman | Francesco25@hotmail.com | Spain |
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; }> | 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 |
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 |