Kinetik UI

Pager

.md

Pagination with a pill that glides to the page; the row keeps its width while the numbers roll in place.

v1.0.0Live on webreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add pager

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/pager.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/pager.tsx
    View source files

Usage

import { Pager } from '@/components/kinetik/pager';

<Pager page={page} pageCount={24} onPageChange={setPage} />;

When to use

  • Long lists split into pages people jump between: search results, orders, records.
  • Places where knowing "page 9 of 24" matters more than endless scrolling.

When not to use

  • Feeds people scroll through once. Load more as they reach the end.
  • Swiping between a few full-screen slides. Use Page Dots.

Notes

  • The first and last pages are always shown, with the current page between gaps; the number of slots never changes, so the row keeps its width.
  • siblings adds pages either side of the current one; each slot is 44 pt, so siblings={1} needs about 400 pt.
  • pagerSlots(page, count, siblings) is exported if you want the same logic elsewhere.
  • With reduced motion the pill jumps and digits change in place.

Props

PagerProps

PropTypeDefaultDescription
pagerequirednumber—The current page, from 1.
pageCountrequirednumber—
onPageChangerequired(page: number) => void—
siblingsnumber0Pages shown on each side of the current one, between the gaps. Defaults to 0.
accessibilityLabelstring'Pages'Names the control. Defaults to "Pages".
hapticsbooleantrueA tick on each change. Defaults to true.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Plain views; one pill on one shared value and one more per slot for the roll. Nothing runs at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.94× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 143 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The pill jumps and the numbers change in place.
Screen readers
Buttons named "Page 9" with the current one selected, plus Previous and Next page buttons that are disabled at the ends.
Touch target
Every slot and arrow is 44 by 44 pt.

Source files

components/kinetik/pager.tsx is in the Code tab of the preview above.