Skip to main content

Pagination

The Pagination component is used to display pagination in applications. It allows users to navigate between different pages of content, improving the user experience when browsing large amounts of data.

Basic use

The sample represents the simplest pagination with default controls and page view.

Max pages

The preview limits the number of pages displayed at a time, so you can clearly see the truncation of longer pagination.

Round

The preview changes the shape of the pagination elements to a round variant, which will affect the overall visual character of the navigation.

First, Last Buttons

The demonstration focuses on the button form of pagination, where the actions of the previous and next page dominate.

Show info

The preview adds textual status information to the pagination, such as the current page or range of results.

When to use

Use wje-pagination when the user enters a value, selects options, or performs an action on a form.

When not to use

Don't just use it as a visual decorative element without interaction. In this case, give priority to the presentation components.

Accessibility

Always link the component to the description (label/aria-label), keep keyboard control, and display a clear message on validation errors.

  • Keep validation rules and error states consistent across the entire form.
  • For asynchronous operations, display the load status or disabled status.
  • For complex forms, prefer smaller sections and immediate feedback.

Attributes and properties

hideEmpty

PopisUrčuje, či je voľba hide-empty zapnutá a ovplyvňuje správanie komponentu.
Atribúthide-empty
Typboolean
Predvolenéfalse

maxPages

PopisNastavuje číselnú hodnotu používanú vo voľbe max-pages.
Atribútmax-pages
Typnumber|string
Predvolené10

page

PopisNastavuje textovú hodnotu uloženú vo voľbe page.
Atribútpage
Typstring
Predvolené0

pageSize

PopisNastavuje rozmery alebo veľkosť pre voľbu page-size.
Atribútpage-size
Typnumber|string
Predvolené3

pageSizeOptions

PopisNastavuje rozmery alebo veľkosť pre voľbu page-size-options.
Atribútpage-size-options
TypArray<number>
Predvolené-

round

PopisUrčuje, či je voľba round zapnutá a ovplyvňuje správanie komponentu.
Atribútround
Typboolean
Predvolenéfalse

showFirstButton

PopisUrčuje, či je voľba show-first-button zapnutá a ovplyvňuje správanie komponentu.
Atribútshow-first-button
Typboolean
Predvolenéfalse

showInfo

PopisUrčuje, či je voľba show-info zapnutá a ovplyvňuje správanie komponentu.
Atribútshow-info
Typboolean
Predvolenéfalse

showLastButton

PopisUrčuje, či je voľba show-last-button zapnutá a ovplyvňuje správanie komponentu.
Atribútshow-last-button
Typboolean
Predvolenéfalse

showPageSizeOptions

PopisNastavuje rozmery alebo veľkosť pre voľbu show-page-size-options.
Atribútshow-page-size-options
Typboolean
Predvolenéfalse

totalItems

PopisNastavuje číselnú hodnotu používanú vo voľbe total-items.
Atribúttotal-items
Typnumber
Predvolené0

Events

NázovPopis
wje-pagination:page-changeVyvolá sa pri zmene stavu komponentu.

Methods

htmlPagination

PopisVytvorí HTML štruktúru pre html pagination.
Signatúra() => DocumentFragment

htmlStackButtons

PopisVytvorí HTML štruktúru pre html stack buttons.
Signatúra(paginateObj: object) => DocumentFragment

CSS shadow parts

NázovPopis
nativeŠtýluje koreňovú shadow časť komponentu.

CSS custom variables

Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.

Slots

Pre tento komponent nie sú dostupné žiadne sloty.