Import
import { Pagination } from '@meteorack/sdk-react';How To Use It
- Use it when result sets are too large to render comfortably in one pass and the user needs explicit page navigation.
- Keep pagination state close to the list or table it controls so the navigation feels local to the data view.
Works Well With
Props
currentPage: numberCurrently active page number.
totalPages: numberTotal number of available pages.
onPageChange: (page: number) => voidCalled when the user navigates to another page.
maxVisible?: numberMaximum number of numbered buttons shown before ellipsis is used.
Example
Pagination.tsx
import { useState } from 'react';
import { Pagination } from '@meteorack/sdk-react';
export function TablePagination() {
const [page, setPage] = useState(3);
return (
<Pagination
currentPage={page}
totalPages={12}
onPageChange={setPage}
maxVisible={5}
/>
);
}