Browse docsPagination

NavigationNew

Glass Pagination

Numbered pages with previous and next, folding long runs into an ellipsis.

pnpm dlx shadcn@4.14.1 add @glassyui/glass-pagination

Preview

Demos ready. Update 0.

Installation

First add the exact @glassyui mapping to components.json as shown in Getting Started. Then run the pinned item command:

Install Glass Pagination

pnpm dlx shadcn@4.14.1 add @glassyui/glass-pagination
What this installs5 files, 1 package

Direct registry declarations

These values belong to @glassyui/glass-pagination itself in registry.json.

Package dependencies

  • clsx

Registry dependencies

  • @glassyui/glass-provider

File targets

  • components/glassyui/glass-pagination.tsx

Complete installed closure

This follows every namespaced registry dependency recursively and de-duplicates the packages and target files installed with this item.

Package dependencies

  • clsx

Installed files

  • components/glassyui/glass-pagination.tsx
  • components/glassyui/glass-provider.tsx
  • components/glassyui/liquid-filters.tsx
  • components/glassyui/lib/preferences.ts
  • components/glassyui/styles/liquid.css

Usage

Usage

import { GlassPagination } from "@/components/glassyui/glass-pagination";

export function Pages() {
  const [page, setPage] = useState(1);

  return <GlassPagination page={page} pageCount={12} onPageChange={setPage} />;
}

Examples

Show more neighbours

<GlassPagination page={page} pageCount={40} siblingCount={2} onPageChange={setPage} />

API

GlassPagination

A nav landmark labelled Pagination, with a button for each page.

page

The current page, counting from 1.

pageCount

How many pages there are.

onPageChange

Called with the page to show.

siblingCount / boundaryCount

Pages shown either side of the current one, and at each end. Both default to 1.

previousLabel / nextLabel

Name the step buttons. Default to Previous page and Next page.

Notes

Accessibility

Each page button is named Page N and the current one carries aria-current="page". The step buttons disable at the ends.

Accessibility

Keep the Radix-backed semantics intact and preserve visible labels, focus states, and keyboard operation when copying the source.

Performance

Use provider quality preferences for dense app screens. Reserve strong refraction for hero or showcase surfaces.