Tessina UI
ConfiguratorGitHubIntroduction
InstallationUsageTheming
ComponentsAccordionAction SheetAlertAlertDialogArea ChartAspectRatioAvatarBadgeBannerBar ChartBottom NavBreadcrumbButtonButtonGroupCalendarCardCarouselChartChatBubbleCheckboxChipCodeBlockCollapsibleColor PickerComboboxCommandContainerContextMenuDate PickerDividerDrawerDropdown MenuEmptyStateFABFieldFieldsetFile UploadFile Upload 2FlexFormGridHoverCardIconButtonLabelLine ChartLinkMenubarMeterModalNavigation MenuNumberFieldOTP InputPaginationPie ChartPopoverProgressPromptInputRadar ChartRadial ChartRadioRatingScroll AreaSearchSegmentedControlSelectShortcutSidebarSkeletonSliderSpacerSpinnerSplit ButtonStackStatusStepperSurfaceSwitchTableTabsTextareaTime PickerToastToggleButtonToggleGroupToolbarTooltipTop Header DesktopTop Header Mobile
Contributing
Components

Pagination

Navigate between pages of content. Five sizes, three active-page variants (default/primary/outline), five border-radius options (none/sm/md/lg/full), three nav styles (icon/label/none), smart ellipsis truncation, controlled/uncontrolled, and LTR/RTL support.

Playground

Installation

pnpm add @tessinaui/ui

Usage

import { Pagination } from "@tessinaui/ui";
{/* Uncontrolled */}
<Pagination count={10} defaultPage={1} />

{/* Controlled */}
<Pagination count={10} page={page} onChange={setPage} />

{/* Primary active style */}
<Pagination count={10} defaultPage={3} variant="primary" />

{/* Text Previous / Next buttons */}
<Pagination count={10} defaultPage={3} navStyle="label" />

{/* Square item shape */}
<Pagination count={10} defaultPage={3} rounded="none" />

{/* Custom truncation */}
<Pagination count={50} defaultPage={25} siblingCount={2} boundaryCount={2} />

{/* RTL */}
<Pagination count={10} defaultPage={3} dir="rtl" navStyle="label" />

Examples

Default

A basic pagination with chevron nav buttons and smart ellipsis truncation.

Variants

Three active-page styles — default, primary, and outline.

Sizes

Five size tokens from xs to xl.

Nav Styles

Navigation buttons as chevron icon, text label, or none.

Controlled

Drive the active page from external state via page and onChange.

Loading

Use PaginationSkeleton as a placeholder while page data loads.

API Reference

Props

PropTypeDefaultDescription
countnumber—Required. Total number of pages
pagenumber—Controlled current page (1-indexed)
defaultPagenumber1Uncontrolled initial page
onChange(page: number) => void—Called when the active page changes
siblingCountnumber1Pages shown on each side of the current page
boundaryCountnumber1Pages always shown at the start and end boundaries
size"xs" | "sm" | "md" | "lg" | "xl""md"Visual size token
variant"default" | "primary" | "outline""default"Active page indicator style
rounded"none" | "sm" | "md" | "lg" | "full""full"Border radius for all buttons
navStyle"icon" | "label" | "none""icon"Navigation button style — see table below
disabledbooleanfalseDisable all interactions
dir"ltr" | "rtl""ltr"Text direction — RTL swaps chevron directions and nav button positions
prevLabelstring"Previous"Label for the Previous button (used with navStyle="label" or "both")
nextLabelstring"Next"Label for the Next button
getPageAriaLabel(page: number, selected: boolean) => string—Custom aria-label generator for page buttons
classNamestring—Additional class on the root <nav> element

Nav styles

ValueDescription
"icon"Chevron icon buttons only — [<] [pages] [>] (default)
"label"Previous / Next text buttons with icons — [← Previous] [pages] [Next →]
"none"No navigation buttons — page items only

Variants

ValueActive page style
"default"bg-secondary (neutral gray fill)
"primary"bg-primary text-on-primary (brand color fill)
"outline"ring-2 ring-inset ring-primary text-primary (outlined border)

Notes

  • Controlled vs uncontrolled: When page is provided the component is fully controlled. Use defaultPage for uncontrolled usage.
  • Ellipsis truncation: Uses the MUI usePagination algorithm — always shows boundaryCount pages at each end and siblingCount pages around the current page, collapsing the rest into ….
  • RTL: dir="rtl" flips the chevron icons (ChevronRight becomes "go back") and swaps the positions of prev/next nav buttons so the "next" action is on the leading (left) side, matching Arabic/Hebrew pagination conventions.
  • Accessibility: Renders as <nav role="navigation"> with aria-label="pagination navigation". Active page buttons have aria-current="page". All buttons have descriptive aria-labels that can be customised via getPageAriaLabel.
  • No headless dependency: Pagination is implemented with plain React state — no Base UI primitives needed.

OTP Input

One-time password input with individual digit cells. Supports three visual variants, five sizes, five intents, masking, separator groups, numeric/alphanumeric/alphabetic input types, and full RTL/LTR support.

Pie Chart

Token-driven pie and donut chart built on Recharts v3, with config-driven slice colours, optional labels, legend, and full light/dark theming.

On this page

PlaygroundInstallationUsageExamplesDefaultVariantsSizesNav StylesControlledLoadingAPI ReferencePropsNav stylesVariantsNotes