Skip to content

Pagination Rail

A raised selection moves through a compact row of numbered page controls.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import PaginationRail from "./PaginationRail";
export default function Example() {
return (
<PaginationRail
defaultPage={3}
count={12}
visiblePages={5}
color={"#c5b69f"}
label={"Collection pages"}
previousLabel={"Previous page"}
nextLabel={"Next page"}
disabled={false}
/>
);
}

Using Pagination Rail

Set count to the total pages and use page with onPageChange to connect routing or data fetching. Page numbers start at one.

The numbered window follows the current page while previous and next disable at the boundaries. In narrow containers the numbered rail scrolls without losing access to the arrow buttons.

Props

NameTypeRequiredDefaultDescription
pagenumberNoundefinedControlled current page, using one-based numbering.
defaultPagenumberNo1Initial uncontrolled page.
onPageChangefunctionNoundefinedReceives the requested page number.
countnumberNo1Total page count, with a minimum of one.
visiblePagesnumberNo5Maximum numbered buttons to show around the current page.
colorstringNo"#c5b69f"Active page and focus colour.
labelstringNo"Pagination"Accessible navigation label.
previousLabelstringNo"Previous page"Previous button label.
nextLabelstringNo"Next page"Next button label.
formatLabelfunctionNoundefinedFormats each page button accessible label.
disabledbooleanNofalseDisable all controls.
classNamestringNo""Additional classes on the root element.
styleCSSPropertiesNoundefinedInline styles for sizing, typography and appearance.

Related components

Layered chevron tabs create a compact trail with a distinct current page.

Folding Menu

Navigation

Numbered navigation panels unfold beneath a compact, tactile trigger.

Path Stepper

Navigation

Numbered stops connect into a clean vertical route with completed and current states.

Bookmark Tabs

Navigation

Numbered paper tabs with a bookmark ribbon and an inset content panel.