About
Page controls for a list that always show the first and last page plus a window around the current page, with proper aria-current and aria-label on every button.
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
"use client";
import * as React from "react";
import Pagination from "@/components/ui/pagination";
export default function PaginationDemo() {
const [page, setPage] = React.useState(5);
const pageCount = 24;
return (
<div className="flex min-h-[200px] w-full items-center justify-center bg-background p-8 text-foreground">
<Pagination page={page} pageCount={pageCount} onChange={setPage} />
</div>
);
}
















