eds-pagination

Explore the Interactive Component

Use the playground below to experiment with the component. Click the button to view the full Storybook deployment for additional examples and configurations.

Pagination Mode

See It in Use with Code

Check out this practical implementation of component.

In HTML
In React

Navigation Mode

See It in Use with Code

In HTML

Check out this practical implementation of component.

In React

Overview

EdsPagination is a component for navigating paginated data.

Key Features:

  • Supports two display modes: “default” (shows numbered page links) and “navigator” (shows Previous/Next buttons).
  • Emits a page event when the page is changed in “default” mode.
  • Automatically generates pagination links based on the currentPage and lastPage.
  • Full keyboard navigation support with arrow keys, Home, End
  • Proper ARIA labels and screen reader support

This component is designed for flexible and accessible pagination controls, suitable for various display needs.

Properties

PropertyAttributeDescriptionTypeDefault
currentPagecurrent-pageThe current active pagenumberundefined
lastPagelast-pageThe last page number availablenumberundefined
modemodeMode of pagination display - ‘default’ shows page numbers, ’navigator’ shows Previous/Next buttons only"default" | "navigator"'default'
nextLabelnext-labelLabel for the next button in navigator modestring'Next'
nextUrlnext-urlURL for the next page in navigator modestring''
perPageper-pageThe number of items per pagenumber10
prevLabelprev-labelLabel for the previous button in navigator modestring'Prev'
prevUrlprev-urlURL for the previous page in navigator modestring''
totaltotalThe total number of itemsnumber0
urlurlBase URL for the pagination linksstring''
useButtonsuse-buttonsWhether to use buttons (for JavaScript pagination) or links (for URL navigation)booleantrue

Dependencies

Used by

Depends on

Graph

graph TD;
  eds-pagination --> eds-button
  eds-pagination --> eds-link
  eds-button --> eds-icon-wrapper
  eds-link --> eds-icon-wrapper
  eds-table --> eds-pagination
  style eds-pagination fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS