Skip to content

Paginator ​

Pagination is a common requirement in web applications where you need to show large amounts of data to the user. The purpose of the Paginator is to split the data into smaller, manageable chunks or pages.

Anatomy ​

  • Page buttons - A series of buttons for each available page.
  • Previous and next buttons - Allow the user to move to the previous or next page.

Component ​

jsx
<alliance-paginator
    page-size="50"
    initial-page="1"
    sibling-count="2"
    item-count="500"
    on:change-page={{(event) => handleEvent(event)}}
/>

Properties ​

PropertyTypeRequiredDefaultDescription
item-countnumberYesTotal amount of items.
page-sizenumberNo50Total amount of items displayed on each page.
initial-pagenumberNo1Which page is selected on initial render.
sibling-countnumberNo2Minimal amount of pages displayed beside the selected page.

Events ​

EventDetailDescription
change-page{ nextPage: number, previousPage: number }Emitted when changing page.