- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Pagination
A pagination with page navigation, next and previous links.
import {
Pagination,
PaginationContent,
PaginationEllipsis,
PaginationItem,
PaginationLink,
PaginationNext,
PaginationPrevious,
} from "@/components/ui/pagination";
export default function Particle() {
return (
<Pagination>
<PaginationContent>
<PaginationItem>
<PaginationPrevious href="#" />
</PaginationItem>
<PaginationItem>
<PaginationLink href="#">1</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationLink href="#" isActive>
2
</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationLink href="#">3</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationEllipsis />
</PaginationItem>
<PaginationItem>
<PaginationNext href="#" />
</PaginationItem>
</PaginationContent>
</Pagination>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/pagination
Usage
import {
Pagination,
PaginationContent,
PaginationEllipsis,
PaginationItem,
PaginationLink,
PaginationNext,
PaginationPrevious,
} from "@/components/ui/pagination";<Pagination>
<PaginationContent>
<PaginationItem>
<PaginationPrevious href="#" />
</PaginationItem>
<PaginationItem>
<PaginationLink href="#">1</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationEllipsis />
</PaginationItem>
<PaginationItem>
<PaginationNext href="#" />
</PaginationItem>
</PaginationContent>
</Pagination>API Reference
This is a custom component, not a Base UI wrapper.
Pagination
Root navigation container with role="navigation" and aria-label="pagination".
PaginationContent
Unordered list container for pagination items.
PaginationItem
Individual list item container.
PaginationLink
Renders an <a> through the Button component. Accepts all standard anchor attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
isActive | boolean | - | Marks the link as the current page. Sets aria-current="page" and data-active, and switches the button variant |
size | ButtonProps["size"] | "icon" | Controls the link size |
The button variant is derived from isActive: the current page renders as outline, every other link as ghost. Without an explicit variant each link fell back to default (bg-primary), which is near-black in light mode — every page number rendered as a solid dark button and the current page was indistinguishable.
PaginationPrevious
Link to the previous page. Renders at size="default" with a chevron left icon and "Previous" text, and carries aria-label="Go to previous page".
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | "Previous" | Label shown next to the chevron. Hidden below the sm breakpoint |
PaginationNext
Link to the next page. Renders at size="default" with "Next" text and a chevron right icon, and carries aria-label="Go to next page".
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | "Next" | Label shown next to the chevron. Hidden below the sm breakpoint |
PaginationEllipsis
Ellipsis indicator for skipped pages. Renders a horizontal-ellipsis icon and is marked aria-hidden.