Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Hover Card
- Input
- Input OTP
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
import {
Pagination,
PaginationContent,
PaginationEllipsis,
PaginationItem,
PaginationLink,Installation
$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.vercel.app/r/pagination.json
Usage
import {
Pagination,
PaginationContent,
PaginationItem,
PaginationLink,
PaginationNext,
PaginationPrevious,
} from "@/components/ui/pagination/pagination";<Pagination>
<PaginationContent>
<PaginationItem>
<PaginationPrevious href="#" />
</PaginationItem>
<PaginationItem>
<PaginationLink href="#">1</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationNext href="#" />
</PaginationItem>
</PaginationContent>
</Pagination>Composition
Use the following composition to build a Pagination:
Pagination
└── PaginationContent
└── PaginationItem
├── PaginationPrevious
├── PaginationLink
├── PaginationEllipsis
└── PaginationNextRTL
To enable right-to-left support, see the RTL guide.
"use client";
import { useTranslation } from "@/components/language-selector";
import type { Translations } from "@/components/language-selector";
import {
Pagination,API Reference
Pagination
The Pagination component is the root nav element that wraps the pagination.
| Prop | Type | Default |
|---|---|---|
className | string | - |
PaginationContent
The PaginationContent component is the ul list that holds the pagination items.
| Prop | Type | Default |
|---|---|---|
className | string | - |
PaginationItem
The PaginationItem component wraps an individual pagination control.
| Prop | Type | Default |
|---|---|---|
className | string | - |
PaginationLink
The PaginationLink component renders a clickable page link.
| Prop | Type | Default |
|---|---|---|
isActive | boolean | false |
className | string | - |
PaginationPrevious
The PaginationPrevious component renders the "previous page" link.
| Prop | Type | Default |
|---|---|---|
className | string | - |
PaginationNext
The PaginationNext component renders the "next page" link.
| Prop | Type | Default |
|---|---|---|
className | string | - |
PaginationEllipsis
The PaginationEllipsis component displays an ellipsis indicator for skipped pages.
| Prop | Type | Default |
|---|---|---|
className | string | - |