Pagination
freePagination divides content into pages and lets users move between them.
- 1
- 2
- 3
- 4
- 5
Installation
Add this component with the NateUI CLI.
Examples
Basic
- 1
- 2
- 3
- 4
- 5
More
- 1
- 50
- 1
- 100
Total
Total 50 Items
- 1
- 50
Page sizes
Total 100 Items
- 1
- 20
Controlled
- 1
- 100
API
Pagination renders page controls from total and pageSize, then reports the selected page through onChange.
| Prop | Description | Type | Default |
|---|---|---|---|
currentPage | Current page number. | number | 1 |
displayTotal | Whether to display the total number of data items. | boolean | false |
onChange | Callback when a pagination index is clicked. | (pageNumber: number) => void | - |
pageSize | Number of data items per page. | number | 1 |
total | Total number of data items. | number | 5 |