A minimal pagination component with prev/next controls and current position indicator.
currentPagenumberonChange(page: number) => voidtotalPagesnumberaria-label?stringdisabled?booleanfalsenextLabel?stringprevLabel?stringref?Ref<HTMLElement>| Prop | Type | Default |
|---|---|---|
currentPage | number | - |
onChange | (page: number) => void | - |
totalPages | number | - |
aria-label? | string | - |
disabled? | boolean | false |
nextLabel? | string | - |
prevLabel? | string | - |
ref? | Ref<HTMLElement> | - |
Props whose default is messages.* fall back to the message dictionary. To change them, see: i18n
import { Pagination } from '@k8ordo/ui';const [page, setPage] = useState(1);
<Pagination
currentPage={page}
onChange={setPage}
totalPages={10}
/><Pagination
currentPage={3}
disabled
onChange={() => {}}
totalPages={10}
/>