ComponentsNavigation
Pagination
Page navigation controls with previous, next, page numbers, and ellipsis indicators — copy it into your project and own it completely.
Default
Sizes
With Ellipsis
Installation
npx visor add paginationThis copies two files into your project:
components/ui/pagination/pagination.tsx— the componentcomponents/ui/pagination/pagination.module.css— the styles
Usage
import {
Pagination,
PaginationContent,
PaginationItem,
PaginationLink,
PaginationPrevious,
PaginationNext,
PaginationEllipsis,
} from '@/components/ui/pagination/pagination';
export default function Example() {
return (
<Pagination>
<PaginationContent>
<PaginationItem><PaginationPrevious href="#" /></PaginationItem>
<PaginationItem><PaginationLink href="#">1</PaginationLink></PaginationItem>
<PaginationItem><PaginationLink href="#">2</PaginationLink></PaginationItem>
<PaginationItem><PaginationNext href="#" /></PaginationItem>
</PaginationContent>
</Pagination>
);
}API Reference
PaginationLink Props
| Prop | Type | Default | Description |
|---|---|---|---|
isActive | boolean | false | Marks a PaginationLink as the current page. Sets aria-current="page". |
size | 'default' | 'sm' | 'lg' | 'default' | Size of PaginationLink buttons. |
href* | string | — | URL for the pagination anchor link. |
className | string | — | Additional CSS class names to merge onto the element. |
Pagination renders a <nav> element and accepts all standard HTML nav attributes. PaginationPrevious and PaginationNext include built-in accessible labels.
Sub-components
| Component | Element | Purpose |
|---|---|---|
Pagination | <nav> | Root navigation container |
PaginationContent | <ul> | List container for pagination items |
PaginationItem | <li> | Wrapper for each page control |
PaginationLink | <a> | Page number link with active state |
PaginationPrevious | <a> | Previous page link with left arrow icon |
PaginationNext | <a> | Next page link with right arrow icon |
PaginationEllipsis | <span> | Visual gap indicator for skipped pages |
Accessibility
Paginationrenders a<nav>element witharia-label="pagination"androle="navigation".PaginationLinksetsaria-current="page"whenisActiveis true.PaginationPreviousincludesaria-label="Go to previous page"andPaginationNextincludesaria-label="Go to next page".PaginationEllipsisis hidden from assistive technology witharia-hidden="true"and includes a visually hidden "More pages" span for screen readers.- When implementing controlled pagination, update
hrefvalues to reflect real page URLs, or useonClickhandlers withhref="#"for client-side routing.
Navbar
A responsive navigation bar with brand, links, and mobile toggle. Supports multiple style variants — copy it into your project and own it completely.
QuickActions
A vertical list of action rows pairing a left-aligned label with a right-aligned Kbd shortcut. Display-only by default; opt-in interactive mode makes rows activatable buttons. Built with CSS Modules — copy it into your project and own it completely.