Pagination
Pagination for navigating between pages. Supports Numeric and Text types, configurable placement, mobile layout, and RTL.
<Pagination type="numeric" placement="center" page={page} totalPages={12}Installation
npx sdaia-ui@latest add pagination
Usage
import { Pagination } from "@/components/ui/pagination"<Pagination type="numeric" placement="center" />Examples
Numeric
Pagination with numbered page buttons.
'use client'; import { useState } from 'react';import { Pagination } from 'sdaia-ui'; Text
Pagination with previous and next text labels instead of numbers.
'use client'; import { useState } from 'react';import { Pagination } from 'sdaia-ui'; Placement
Pagination aligned to the start, center, or end of its container.
'use client'; import { useState } from 'react';import { Pagination } from 'sdaia-ui'; Mobile
Compact pagination layout optimised for mobile screens.
'use client'; import { useState } from 'react';import { Pagination } from 'sdaia-ui'; API Reference
PaginationProps
Props for the Pagination component.
Prop | Type | Default | Required |
|---|---|---|---|
type | 'numeric' | 'text' | 'button' | "numeric" | optional |
placement | 'start' | 'center' | 'end' | "start" | optional |
mobile | boolean | false | optional |
rtl | boolean | false | optional |
page | number | mobile ? 2 : 3 | optional |
totalPages | number | mobile ? 8 : 12 | optional |
onPageChange | (page: number) => void | - | optional |