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
| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
Pagination | sx | StyleXStyles | — | StyleX override on the root <nav> |
Pagination.List | sx | StyleXStyles | — | StyleX override on the <ul> |
Pagination.Item | sx | StyleXStyles | — | StyleX override on the <li> |
Pagination.Link | active | boolean | false | Marks this link as the current page |
Pagination.Link | href | string | — | Link destination |
Pagination.Link | sx | StyleXStyles | — | StyleX override |
Pagination.Previous | disabled | boolean | false | Disables the control when on the first page |
Pagination.Previous | href | string | — | Link destination |
Pagination.Previous | icons | { previous?: ReactNode } | — | Replaces the built-in icons. See the Icons guide |
Pagination.Next | disabled | boolean | false | Disables the control when on the last page |
Pagination.Next | href | string | — | Link destination |
Pagination.Next | icons | { next?: ReactNode } | — | Replaces the built-in icons. See the Icons guide |
Pagination.Ellipsis | sx | StyleXStyles | — | StyleX override |
All other HTML attributes are forwarded.
Accessibility
- Root is
<nav aria-label="pagination">. - The current page uses
aria-current="page". PreviousandNextusearia-label="Go to previous/next page".- Disabled step controls use
aria-disabledand have pointer events removed via CSS. - The ellipsis is marked
aria-hidden="true"so screen readers skip it.
Keyboard
| Key | Action |
|---|---|
Tab | Moves focus to the next page control |
Shift + Tab | Moves focus to the previous page control |
Enter | Follows the focused link |