ValyroUI Русская версия

Pagination

Page navigation. Free, MIT · Navigation and layout › Switching

Installation

npx valyro-cli@latest add pagination
npx shadcn@latest add https://valyro.xyz/r/pagination.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { Pagination } from 'valyro-ui';

Props

PropTypeDefault
pageCount *numberTotal number of pages; non-finite or lower values count as 1.
valuenumberCurrent page, 1-based.
defaultValuenumber1Initial value when uncontrolled.
onValueChange(page: number) => voidCalled with the new value when it changes.
siblingsnumber1Page buttons shown on each side of the current page before an ellipsis.
boundariesnumber1Page buttons always shown at the start and at the end.
variant'default' | 'compact''default'compact shows "Page 3 of 10" between the arrows instead of page numbers.
size'sm' | 'md' | 'lg''sm'Height of the page buttons: 32 / 40 / 48px, like the other controls' sm / md / lg.
labelsPartial<PaginationLabels>Overrides for the built-in English strings.
localestringLocale for page numbers (default: the ThemeProvider's, then the browser's).
animation'default' | 'spring''default'spring: the current-page cursor springs to the chosen page with a slight overshoot. default: the theme's curve.

Related components

Previous: Segmented Control · Next: Stepper · All Navigation and layout