Knit UI
GitHub

Playground

Loading playground…

true
false
true
false
false
false
Playground
<Pagination
  total={10}
  defaultValue={1}
  size="md"
  withControls
  withEdges={false}
  withPages
  grouped={false}
  disabled={false}
  hideWithOnePage={false}
  siblings={1}
  boundaries={1}
/>

Examples

Sizes

All seven sizes rendered side-by-side, from xxs to xxl.

Loading example…

SizesSourceStorybook

Shadows

Each elevation of the inherited shadow prop applied to the pagination row.

Loading example…

ShadowsSourceStorybook

Disabled

Disabled state — all controls are dimmed and non-interactive.

Loading example…

DisabledSourceStorybook

With Edges

Edge controls (first / last) are shown alongside prev / next.

Loading example…

With EdgesSourceStorybook

Grouped

grouped attaches every control into a single flush group: gaps collapse, adjacent borders merge into a shared 1px line, and only the outer corners stay rounded — the same attached treatment as Button.Group / ActionIcon.Group.

Loading example…

GroupedSourceStorybook

Siblings And Boundaries

Wider siblings and boundaries values reduce dots truncation.

Loading example…

Siblings And BoundariesSourceStorybook

Custom Icons

Custom icons replace the default arrow glyphs on the step and edge controls.

Loading example…

Custom IconsSourceStorybook

Controlled

Controlled — active page is owned by the parent component; current page is displayed.

Loading example…

ControlledSourceStorybook

Compound API

Compound API — build a custom layout using Pagination.Root and its sub-components directly.

Loading example…

Compound APISourceStorybook

Styles

Per-slot styles targets individual parts — here the item page controls and the control step controls.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
total requirednumber10Total number of pages.
boundariesnumber | undefined1Pages always shown at the start and end.
childrenReactNode
defaultValuenumber | undefined1Uncontrolled initial active page (1-based).
disabled systemboolean | undefinedfalseDisable the entire pagination.
dotsIconReactNode
firstIconReactNode
getControlProps((control: PaginationControlType) => Partial<PaginationControlProps>) | undefinedPer-edge/step-control prop overrides (`first` / `previous` / `next` / `last`).
getItemProps((page: number) => Partial<PaginationControlProps>) | undefinedPer-page-control prop overrides.
groupedboolean | undefinedfalseAttach all controls into a single flush group (collapsed borders).
hideWithOnePageboolean | undefinedfalseHide entirely when total <= 1.
lastIconReactNode
nextIconReactNodeIcon overrides for the step/edge/dots controls.
onChange((page: number) => void) | undefinedCalled when the active page changes.
onFirstPage(() => void) | undefinedCalled when the first-page control fires.
onLastPage(() => void) | undefinedCalled when the last-page control fires.
onNextPage(() => void) | undefinedCalled when the next-page control fires.
onPreviousPage(() => void) | undefinedCalled when the previous-page control fires.
previousIconReactNode
radius systemstring | number | undefinedBorder-radius token applied to each control.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
siblingsnumber | undefined1Pages shown on each side of the active page.
size system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
xxs · xs · sm · md · lg · xl · xxl
'md'Controls the dimensions of each page button.
styles systemSlotStyles<PaginationStyles> | undefinedPer-slot style sugar — props spread onto the matching controls.
theme systemThemeName | null | undefinedApplies a theme to this element
valuenumber | undefinedControlled active page (1-based).
withControlsboolean | undefinedtrueShow previous / next step controls.
withEdgesboolean | undefinedfalseShow first / last edge controls.
withPagesboolean | undefinedtrueShow the numbered page controls.

Style slots

Every part of Pagination can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
controlstyles={{ control: { … } }}
dotsstyles={{ dots: { … } }}
itemstyles={{ item: { … } }}
rootstyles={{ root: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 496 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.