Componentnavigation0.93 KB gzipZero dependencies
Pagination
Numbered buttons with ellipsis and page stepping.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add paginationOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Pagination } from "@/components/ui/pagination"; <Pagination page={1} totalPages={10} onPageChange={(p) => setPage(p)} />Source code
pagination.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxpagination.tsx148 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface PaginationProps { page: number; totalPages: number; onPageChange?: (page: number) => void; getPageHref?: (page: number) => string; siblingCount?: number; className?: string; "aria-label"?: string;} export const Pagination = React.forwardRef<HTMLElement, PaginationProps>(function Pagination( { page = 1,Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Pagination } from "@/components/ui/pagination"; <Pagination />| Prop | Type | Description |
|---|---|---|
| page | number | Configures page. (Default: 1) |
| totalPages | number | Configures total pages. (Default: 1) |
| onPageChange | (page: number) => void | Callback invoked on page change. |
| getPageHref | (page: number) => string | Configures get page href. |
| siblingCount | number | Configures sibling count. (Default: 1) |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |
| aria-label | string | Configures aria label. |