Pagination
The Pagination widget is a macro component built from multiple parts.
required props
- the
totalnumber of pages - the
valueof the cursor aka selected page number. - the
onChangehandler, which receives the tentative page number:
const [activePage, setActivePage] = useState<number>(1)
//
<Pagination total={10} value={activePage} onChange={setActivePage} />
other props
withControls, to show previous and next arrows, defaults to true.withEdges, to show "first page" and "last page" arrows, default to false.size, to get bigger or smaller pagination control, defaults to mdradius, to get rounder or squarer controls, defaults to md