About
A page navigation control for long lists that shows numbered pages with truncation around the current page, aria-current on the active page, and disabled previous/next buttons at the boundaries.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Pagination to your project and fits it to your theme.
Code
How Pagination is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Pagination from "@/components/ui/pagination";
import { useState } from "react";
export default function PaginationDemo() {
const [page, setPage] = useState(3);
return (
<div
className="flex min-h-[220px] w-full flex-col items-center justify-center gap-4 p-8"
style={{
background: "var(--mors-color-canvas)",
color: "var(--mors-color-text)",
}}
>
<Pagination page={page} pageCount={12} onPageChange={setPage} />
<span
className="text-sm"
style={{
color: "var(--mors-color-text-secondary)",
fontFamily: "var(--mors-font-sans)",
}}
>
Page {page} of 12
</span>
</div>
);
}
















