Overview
The Pagination component provides page navigation with two variants: default card style and minimal style.Basic Usage
- Code
- Preview
Minimal Variant
- Code
- Preview
With Custom Label
- Code
- Preview
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Pagination component with default and minimal variants
import { PaginationCardDefault } from '@peppermint-design/devreadykit-custom';
import { useState } from 'react';
export default function PaginationBasic() {
const [page, setPage] = useState(1);
return (
<PaginationCardDefault
page={page}
totalPages={10}
onPageChange={setPage}
/>
);
}
import { PaginationCardMinimal } from '@peppermint-design/devreadykit-custom';
import { useState } from 'react';
export default function PaginationMinimal() {
const [page, setPage] = useState(1);
return (
<PaginationCardMinimal
page={page}
totalPages={10}
onPageChange={setPage}
/>
);
}
import { PaginationCardMinimal } from '@peppermint-design/devreadykit-custom';
import { useState } from 'react';
export default function PaginationCustomLabel() {
const [page, setPage] = useState(1);
return (
<PaginationCardMinimal
page={page}
totalPages={10}
onPageChange={setPage}
labelFormatter={(page, total) => `${page} / ${total}`}
/>
);
}