Loading...
Installation
Install the following dependencies:
Copy and paste the following code into your project.
Loading...
Update the import paths to match your project setup.
Composition
Pagination ├── PaginationFirst (optional) ├── PaginationPrevious ├── PaginationItem ├── PaginationEllipsis (optional) ├── PaginationNext └── PaginationLast (optional)
Examples
Default
Loading...
Icons Only
Loading...
Previous And Next
Loading...
Rows Per Page
Loading...
With A List
Loading...
API Reference
Pagination
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | undefined | — | Unique identifier used to connect the component parts. |
ids | ElementIds | undefined | — | Overrides generated identifiers for individual parts. |
translations | IntlTranslations | undefined | — | Configures translations. |
count | number | undefined | — | Configures count. |
pageSize | number | undefined | — | Configures page size. |
defaultPageSize | number | undefined | — | Configures default page size. |
siblingCount | number | undefined | — | Configures sibling count. |
boundaryCount | number | undefined | — | Configures boundary count. |
page | number | undefined | — | Configures page. |
defaultPage | number | undefined | — | Configures default page. |
onPageChange | ((details: PageChangeDetails) => void) | undefined | — | Runs when page changes. |
onPageSizeChange | ((details: PageSizeChangeDetails) => void) | undefined | — | Runs when page size changes. |
type | "button" | "link" | undefined | — | Configures type. |
getPageUrl | ((details: PageUrlDetails) => string) | undefined | — | Configures get page url. |
Context, Hooks, and Types
| Export | API |
|---|---|
PaginationContext | Render-prop component that exposes component state and actions. |
PaginationRootProvider | Provides an externally created API to the component tree. |
usePagination | Creates or accesses the component API. |
usePaginationContext | Returns the nearest component API. |
Angular
React
Solid
Svelte
Vue