Origin UI

Joined Pagination

Buttons 7

About

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Joined Pagination to your project and fits it to your theme.

Code

How Joined Pagination is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { useState } from "react";
import { JoinedPagination } from "@/components/ui/joined-pagination";

const ITEMS_PER_PAGE = 5;
const TOTAL_ITEMS = 100;

function JoinedPaginationDemo() {
  const [currentPage, setCurrentPage] = useState(1);
  const totalPages = Math.ceil(TOTAL_ITEMS / ITEMS_PER_PAGE);

  const items = Array.from({ length: ITEMS_PER_PAGE }, (_, i) => ({
    id: (currentPage - 1) * ITEMS_PER_PAGE + i + 1,
    title: `Item ${(currentPage - 1) * ITEMS_PER_PAGE + i + 1}`,
  }));

  return (
    <div className="flex min-w-[300px] flex-col space-y-4 rounded-lg border p-4">
      <div className="space-y-2">
        {items.map((item) => (
          <div
            key={item.id}
            className="rounded-md bg-muted/50 p-2 text-sm"
          >
            {item.title}
          </div>
        ))}
      </div>

      <JoinedPagination
        currentPage={currentPage}
        totalPages={totalPages}
        paginationItemsToDisplay={5}
        onPageChange={setCurrentPage}
      />
    </div>
  );
}

export { JoinedPaginationDemo };

Dependencies

More by Origin UI

View all
  • Dialog

    Dialog

    1.3K
  • Avatar

    Avatar

    1K
  • useImageUpload

    useImageUpload

    950
  • usePagination

    usePagination

    635
  • Popover

    Popover

    390
  • Button

    Button

    382
  • Command

    Command

    345
  • Calendar [React Day Picker]

    Calendar [React Day Picker]

    270

More in Buttons

View all
  • Texture Button

    Texture Button

    106
  • Notification Button

    Notification Button

    115
  • Button

    Button

    1
  • HeroUI Button Group

    HeroUI Button Group

  • Button

    Button

    12
  • Base Button

    Base Button

    1
  • App Store Button

    App Store Button

    483
  • Split Button

    Split Button

    37