Pagination
paginationPage links rendered on the server, with the ends always reachable and a gap only where it hides more than one page. Previous and next hold their place on the first and last page, so nothing shifts as you click through.
import { Pagination } from "@/components/forme/pagination/pagination";
export function PaginationDemo() {
return (
<div className="flex flex-col items-start gap-4">
<Pagination page={1} pageCount={5} hrefFor={(page) => `?page=${page}`} />
<Pagination page={7} pageCount={24} hrefFor={(page) => `?page=${page}`} />
<Pagination page={24} pageCount={24} hrefFor={(page) => `?page=${page}`} />
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Pagination
Pagination as links, rendered on the server.
| Prop | Type | Default | Description |
|---|---|---|---|
page* | number | — | |
pageCount* | number | — | |
hrefFor* | (page: number) => string | — | Builds the link for a page. Links rather than callbacks, so every page is shareable. |
siblings | number | 1 | Pages shown either side of the current one before collapsing into an ellipsis. |
Also takes every prop of <nav> attributes.
Related


Breadcrumb
Where a page sits in the hierarchy, as a labelled nav with an ordered list and the current page marked. Separators are drawn in CSS, so a screen reader hears the path and not the slashes.
navigation

Command menu
A command palette opened with ⌘K or Ctrl K, with a search field, grouped items, keyword matching and an empty state. Built on cmdk for the filtering and the keyboard path, inside a Radix dialog for the focus trap.
navigation

Dock
A macOS-style row of icons that swell under the pointer on a spring, with their neighbours growing too. Labels show on hover and focus, open apps get a dot, and reduced motion keeps every icon at its resting size.
navigation