Componentnavigation0.93 KB gzipZero dependencies

Pagination

Numbered buttons with ellipsis and page stepping.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add pagination

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { Pagination } from "@/components/ui/pagination"; <Pagination page={1} totalPages={10} onPageChange={(p) => setPage(p)} />

Source code

pagination.tsx + 1 helper

Zero 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 />
PropTypeDescription
pagenumberConfigures page. (Default: 1)
totalPagesnumberConfigures total pages. (Default: 1)
onPageChange(page: number) => voidCallback invoked on page change.
getPageHref(page: number) => stringConfigures get page href.
siblingCountnumberConfigures sibling count. (Default: 1)
classNamestringOptional Tailwind or custom CSS classes merged with component styles.
aria-labelstringConfigures aria label.