Skip to content

Pagination API

import { Pagination } from '@cimpress-ui/react';

This component can be used in a controlled or uncontrolled way.

In the controlled way, this component doesn’t maintain its own internal state, and its value is provided by the parent component. Use the controlled way when you need to be able to change the state of this component in other parts of your application.

In the uncontrolled way, this component maintains its own internal state, and can optionally notify the parent component when its internal state changes. Use the uncontrolled way when you don’t need to change the state of this component in other parts of your application.

Pagination renders a navigation landmark, and requires a textual label to identify itself to assistive technologies. See our accessibility guide for more details.

If pagination controls a subsection of the page (for example, a data table), paginatedElementId prop should be set to the id of the paginated element. This allows assistive technologies to understand the association between the paginated element and its pagination controls.

Allows navigating across multiple pages of related content.

See pagination usage guidelines.

Ref<HTMLElement>

The ref type for this component.

PaginationProps
number

The total number of pages.

string

The id of the paginated element. You must provide this prop when pagination controls a subsection of the page (for example, a data table).

number

The current page number (controlled). Should be between 1 and pageCount.

number

The default page number (uncontrolled). Should be between 1 and pageCount.

(page: number) => void

A callback function that is called when the page number changes.

(page: number) => string

A function that returns a URL for a given page number.

string

The element's unique identifier. See MDN.

boolean

Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.

string

Sets the CSS className for the element. Only use as a last resort. Use style props instead.

See styling guide.

CSSProperties

Sets the CSS style for the element. Only use as a last resort. Use style props instead.

See styling guide.

string

Defines a string value that labels the current element.

string

Identifies the element (or elements) that labels the current element.

string

Identifies the element (or elements) that describes the object.

string

Identifies the element (or elements) that provide a detailed, extended description for the object.

undefined

Options for the configured client side router.

string

Hints at the human language of the linked URL. SeeMDN.

HTMLAttributeAnchorTarget

The target window for the link. See MDN.

string

The relationship between the linked resource and the current page. See MDN.

string | boolean

Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN.

string

A space-separated list of URLs to ping when the link is followed. See MDN.

HTMLAttributeReferrerPolicy

How much of the referrer to send when following the link. See MDN.

StyleProps
Responsive<Spacing | "auto">

The amount of margin applied to all edges of this component.

Responsive<Spacing | "auto">

The amount of margin applied to the left and right edges of this component. Takes priority over margin.

Responsive<Spacing | "auto">

The amount of margin applied to the top and bottom edges of this component. Takes priority over margin.

Responsive<Spacing | "auto">

The amount of margin applied to the top edge of this component. Takes priority over marginY and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the right edge of this component. Takes priority over marginX and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the bottom edge of this component. Takes priority over marginY and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the left edge of this component. Takes priority over marginX and margin.