bmates-uiBMates UI
Latest
/Components

Pagination

Navigation for moving through a collection of pages.

Navigation for moving through a collection of pages.

Import

import {
  AutoPagination,
  Pagination,
  PaginationLink,
  PaginationPreviousLink,
} from 'bmates-ui';

Basic usage

The example below mirrors the primary Storybook composition and can be used as a starting point.

<Pagination>
  <PaginationContent>
    <PaginationPreviousLink />
    <PaginationItem><PaginationLink selected>1</PaginationLink></PaginationItem>
    <PaginationItem><PaginationLink>2</PaginationLink></PaginationItem>
  </PaginationContent>
</Pagination>

Preview

Pagination

Prop previews

The examples below isolate the props that change visual output or interaction.

Selected page

Selected page

Disabled links

Component API

PaginationLink.selected

Marks the current page.

PaginationLink.disabled

Prevents navigation.

AutoPagination.pageNo

Required current page number.

AutoPagination.pageSize

Required total number of pages.

AutoPagination.pageGap

Maximum visible page links.

AutoPagination.linkas

Custom link component.

Usage notes

  • Every component in the table is exported from bmates-ui.
  • Unless noted otherwise, a component also accepts the standard props of its underlying HTML element.
  • For application-owned state, use a controlled value and its change handler instead of only a default* prop.