redrob-labs

Pagination

Navigation

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 PaginationShortListDemo() {
  const [page, setPage] = React.useState(1);
  const pageCount = 5;

  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}
        label="Results pagination"
      />
    </div>
  );
}

More by redrob-labs

View all
  • Alert

    Alert

    44
  • Meter

    Meter

    29
  • Schedule Picker

    Schedule Picker

    28
  • Switch

    Switch

    11
  • Status Card

    Status Card

    10
  • Hero Section

    Hero Section

    10
  • Memory Scope

    Memory Scope

    9
  • Accordion

    Accordion

    5

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    100
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    295
  • Sidebar

    Sidebar

    422
  • Pagination with Ellipsis

    Pagination with Ellipsis

    25
  • Pagination

    Pagination

    3
  • Tabs

    Tabs

    33
  • Menu

    Menu

    23
  • Breadrcrumb

    Breadrcrumb

    6