murad-sinatra

Pagination

Navigation

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 CompactPaginationDemo() {
  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}
        size="sm"
        siblingCount={2}
      />
      <span
        className="text-sm"
        style={{
          color: "var(--mors-color-text-secondary)",
          fontFamily: "var(--mors-font-sans)",
        }}
      >
        Page {page} of 12
      </span>
    </div>
  );
}

More by murad-sinatra

View all
  • Event Calendar

    Event Calendar

    61
  • Table

    Table

    8
  • Drawer

    Drawer

    7
  • Combobox

    Combobox

    4
  • Toggles

    Toggles

    4
  • Command Palette

    Command Palette

    3
  • Mors Card

    Mors Card

    3
  • Token Field

    Token Field

    3

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    81
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    255
  • Button Breadcrumb

    Button Breadcrumb

    36
  • Sidebar

    Sidebar

    414
  • Astryx Breadcrumb Item

    Astryx Breadcrumb Item

  • Menu

    Menu

    27
  • Progress Bar Stepper

    Progress Bar Stepper

    64
  • Pagination

    Pagination

    14