UI Components
Pagination
Page navigation control with ellipsis, prev/next buttons, and keyboard support.
Quick Preview
Installation
// Copy fromsrc/components/ui/Pagination.tsx
Usage
'use client'import { useState } from 'react'import { Pagination } from '@/components/ui/Pagination'export default function Page() {const [page, setPage] = useState(1)return (<Paginationtotal={200}page={page}pageSize={20}onChange={setPage}/>)}
Examples
Many pages
Few pages
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
total* | number | - | Total number of items |
page* | number | - | Current active page (1-based) |
pageSize | number | 10 | Items per page |
siblingCount | number | 1 | Pages shown on each side of current |
onChange* | (page: number) => void | - | Callback when page changes |
className | string | - | Additional CSS classes |