• CMSnpm version

    • Overview
    • ContentBuilder
    • InviteUserForm
    • LoginForm
    • RenewPasswordForm
  • UInpm version

    • Overview
    • Accordion
    • AlertBubble
    • AnnouncementBar
    • Avatar
    • AvatarFileInput
    • Badge
    • Button
    • ButtonGroup
    • ButtonList
    • Calendar
    • Checkbox
    • CheckboxButton
    • CheckboxInput
    • CheckboxList
    • Chip
    • ColorRadio
    • ColorRadioGroup
    • Combobox
    • DatePicker
    • DatePickerInput
    • DateRangePicker
    • DateRangePickerInput
    • DatetimePicker
    • DatetimePickerInput
    • Dialog
    • Dropdown
    • Dropzone
    • ErrorMessage
    • FileInput
    • FlashMessages
    • FormComponent
    • Icon
    • IconButton
    • ImageGallery
    • InfoBox
    • Input
    • Label
    • Layout
    • Lightbox
    • ListItem
    • Loader
    • Lozenge
    • Menu
    • Message
    • Modal
    • ✅ ModalDialog
    • ✅ ModalHeader
    • MultiCombobox
    • MultiSelect
    • Pagination
    • Paper
    • Popover
    • Radio
    • RadioGroup
    • RasterImage
    • Select
    • ✅ Tabs
    • TextInput
    • TextLink
    • Textarea
    • TimePicker
    • TimePickerInput
    • Toggle
    • Tooltip
    • Typography
  • Formnpm version

    • Overview
    • AvatarFileInput
    • CheckboxButton
    • CheckboxInput
    • CheckboxList
    • ColorRadioGroup
    • Combobox
    • DatePickerInput
    • DateRangePickerInput
    • DatetimePickerInput
    • Dropzone
    • FileInput
    • Form
    • FormRenderer
    • GpsInput
    • MoneyInput
    • MultiCombobox
    • MultiSelect
    • NumberInput
    • PasswordInput
    • RadioGroup
    • Select
    • TextInput
    • Textarea
    • TimePickerInput
    • Toggle
  • DataGridnpm version

    • Overview
    • DataGrid
    • DataGridCustomExample
    • ExportButton
    • FilterList
    • Filters
    • FiltersButton
    • FulltextInput
    • HiddenColumns
    • HiddenColumnsButton
    • Pagination
    • RowCounts
    • RowsPerPageSelect
    • SelectedRowsToolbar
    • TableV2
    • ToolbarControl
    • ToolbarCustoms
    • ToolbarTabs
  • Wysiwygnpm version

    • Overview
  • Resizernpm version

    • Overview
  • Routernpm version

    • Overview
  • Corenpm version

    • Overview
  • Core-Reactnpm version

    • Overview
  • Stylesnpm version

    • Overview
  • Localizenpm version

    • Overview
  • Analyticsnpm version

    • Overview
  • Datepickernpm version

    • Overview
  • Icons-generatornpm version

    • Overview
  • Smart-addressnpm version

    • Overview
  • E2Enpm version

    • Overview
  • E2E-Playwrightnpm version

    • Overview
View source on GitLab

Pagination

Controlled page navigator: renders numbered page buttons with previous/next (and optional first/last) controls and ellipses for gaps.

When to use

Use Pagination to page through a known number of pages. It is a controlled primitive — you own the current page and update it in onPageChange; the component computes which numbers, ellipses, and boundary buttons to show.

There is no @uxf/form twin — Pagination is not a form field.

Usage

import { Pagination } from "@uxf/ui/pagination";
import { useState } from "react";

function Example() {
    const [page, setPage] = useState(1);

    return <Pagination count={10} onPageChange={setPage} page={page} />;
}

Props

Prop Type Default Description
count number — Required. Total number of pages.
page number — Required. Current page (1-based).
onPageChange (index: number) => void — Required. Called with the target page (1-based) when a page number or nav button is activated.
size keyof PaginationSizes "default" Control size.
showFirstButton boolean false Render a "go to first page" button.
showLastButton boolean false Render a "go to last page" button.
className string — Extra class on the root <nav>.

Variants & states

Built-in sizes (from theme.ts):

Group Values
size xs, sm, default, lg, xl

PaginationSizes is an open interface. A project can add its own sizes via module augmentation:

// pagination.d.ts
declare module "@uxf/ui/pagination/theme" {
    interface PaginationSizes {
        xxl: true;
    }
}

Behavioural states:

  • Boundaries: the previous/first buttons are disabled when page === 1; the next/last buttons are disabled when page === count.
  • Ellipses: gap items (start-ellipsis / end-ellipsis) are rendered as non-interactive ….

Requirements

Pagination renders Icon for its nav arrows, so import both stylesheets once in your global CSS:

@import url("@uxf/ui/css/pagination.css");
@import url("@uxf/ui/css/icon.css");

The app's icon set (configured on UiContextProvider, see Icon) must include the arrow icons used by the nav buttons:

  • chevronsLeft
  • chevronLeft
  • chevronRight
  • chevronsRight

Also requires the global @uxf/ui token layer, set up once per app — see @uxf/ui setup.

Default
Open in new tab