DOCS
v0.4

Components / Pagination

Pagination

Page navigation with prev/next arrows, smart ellipsis gaps, accent-highlighted current page, 3 size variants, configurable siblings, press-scale feedback, and mobile responsive.

navigationv0.5.0

Playground

Examples

Basic
<cg-pagination total="20" current="5"></cg-pagination>
Sizes
<cg-stack gap="md"><cg-pagination total="10" current="3" size="sm"></cg-pagination><cg-pagination total="10" current="3" size="md"></cg-pagination><cg-pagination total="10" current="3" size="lg"></cg-pagination></cg-stack>

Import

import { CgPagination } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/cg-pagination';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
totalnumber1Total number of pages
currentnumber1Current active page
siblingsnumber1Number of pages shown around current
size"sm" | "md" | "lg""md"Button size — sm (28px), md (36px), lg (44px)
showFirstbooleantrueAlways show first page number
showLastbooleantrueAlways show last page number
rounded"none" | "sm" | "md" | "lg" | "full""md"Border radius variant

Events

EventDetailDescription
cg-page-change{page: number}When a page button is clicked