ui

Pagination

A pagination with page navigation, next and previous links. Built with Base UI and Tailwind CSS. Copy-paste ready.

Installation

Usage

Examples

Without Labels

Removes the "Previous" and "Next" text labels, showing only arrow icons for a more compact pagination bar.

With Hover Effect

Adds a background highlight on hover for each page number link to improve click affordance.

With Circle Buttons

Renders each page number as a circular button for a rounder, more icon-centric pagination style.

With Go-To-Page Input

Adds a text input that lets users jump directly to any page number without clicking through sequentially.

In Card

Wraps pagination controls inside a Card alongside a row count indicator, suitable for table footers.

With Arrows Buttons

Uses larger arrow-only buttons with no visible page numbers for simple previous/next browsing.

Page Info Centered

Centers a "Page X of Y" text label between the previous and next controls.

Page Info Left

Aligns the page info string to the left with the previous/next controls pushed to the right.

Outline Buttons

Renders page buttons with an outline border variant instead of the default ghost style for a more defined appearance.

With Page Select

Adds a Select for choosing the current page and dedicated first/last page buttons for large datasets.

Numbered With Input

Combines numbered page links with an inline jump-to input field for large paginated datasets.

A full-featured pagination bar including total count, ellipsis collapse, and a rows-per-page select dropdown.

Mini Pill

A compact rounded-full border wrapping previous/next arrows around a centered "X of Y" counter — minimal footprint for tight layouts.

Older / Newer Navigation

Blog-style cursor navigation with "← Newer posts" and "Older posts →" links instead of numbered pages — ideal for chronological feeds.

Controlled with Smart Ellipsis

A useState-driven pagination that recomputes the visible page window on every click, collapsing distant pages into PaginationEllipsis automatically.

Results Summary

A two-column bar with "Showing 41–60 of 230 results" on the left and compact prev/next arrows flanking a "3 / 12" counter on the right.

Loading State

The entire pagination bar is dimmed with pointer-events-none opacity-40 and overlaid with a spinning Loader2Icon to communicate that results are being fetched.