adit-firdaus

Pagination

Navigation

About

A numeric page navigator with an animated sliding highlight on the current page, that collapses into a compact "Page X of Y" readout when there isn't room for the full row of page keys.

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 * as React from "react";
import Pagination from "@/components/ui/pagination";

function SizeRow({ size }: { size: "sm" | "md" | "lg" }) {
  const [page, setPage] = React.useState(2);
  return (
    <Pagination size={size} page={page} pageCount={8} onPageChange={setPage} />
  );
}

export default function PaginationSizesDemo() {
  return (
    <div className="flex w-full flex-col items-center justify-center gap-4 p-10">
      <SizeRow size="sm" />
      <SizeRow size="md" />
      <SizeRow size="lg" />
    </div>
  );
}

Dependencies

More by adit-firdaus

View all
  • Steps

    Steps

    28
  • Popover

    Popover

    3
  • Adaptive Card

    Adaptive Card

  • Box

    Box

More in Navigation

View all
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    76
  • Footer with Big Wordmark

    Footer with Big Wordmark

    40
  • Sidebar

    Sidebar

    392
  • Oversized 404 Numeral

    Oversized 404 Numeral

    78
  • Navbar with Theme Toggle

    Navbar with Theme Toggle

    67
  • NavBar

    NavBar

    2
  • Pagination

    Pagination

    109
  • Tabs like bookmark

    Tabs like bookmark

    82