Pagination

Pagination component helps you divide a larger data into smaller chunks or pieces.

Usage#

The Pagination component in palette is quite straight forward, it requires two main props page and totalPages, where page denotes the current page and totalPages denotes the total number of pages. Apart from these two there is also another prop onPageChange which is a function where the page to changed is given as argument.

1
of
10

Example#

<Pagination
page={page}
onPageChange={(currPage) => setPage(currPage)}
totalPages={10}
/>

API#

PropTypePossible valuesDefault Value
pagenumberAny number-
totalPagesnumberAny number-
onPageChange(currPage:number) => void--

Built by Akshay 🤙