Pagination

Navigate between pages of a paginated resource.

Import

import { Pagination } from '@matix/components/pagination';

Usage

Pagination is purely presentational — the consumer owns page state and decides which item to mark active. Every item renders as an <a> so URLs are shareable and the UI works without JavaScript.

Disabled Step

Pass disabled to Previous or Next when the user is on the first or last page.

API Reference

ComponentPropTypeDefaultDescription
PaginationsxStyleXStyles—StyleX override on the root <nav>
Pagination.ListsxStyleXStyles—StyleX override on the <ul>
Pagination.ItemsxStyleXStyles—StyleX override on the <li>
Pagination.LinkactivebooleanfalseMarks this link as the current page
Pagination.Linkhrefstring—Link destination
Pagination.LinksxStyleXStyles—StyleX override
Pagination.PreviousdisabledbooleanfalseDisables the control when on the first page
Pagination.Previoushrefstring—Link destination
Pagination.Previousicons{ previous?: ReactNode }—Replaces the built-in icons. See the Icons guide
Pagination.NextdisabledbooleanfalseDisables the control when on the last page
Pagination.Nexthrefstring—Link destination
Pagination.Nexticons{ next?: ReactNode }—Replaces the built-in icons. See the Icons guide
Pagination.EllipsissxStyleXStyles—StyleX override

All other HTML attributes are forwarded.

Accessibility

  • Root is <nav aria-label="pagination">.
  • The current page uses aria-current="page".
  • Previous and Next use aria-label="Go to previous/next page".
  • Disabled step controls use aria-disabled and have pointer events removed via CSS.
  • The ellipsis is marked aria-hidden="true" so screen readers skip it.

Keyboard

KeyAction
TabMoves focus to the next page control
Shift + TabMoves focus to the previous page control
EnterFollows the focused link