KANTO DS v1.12.0
Customise

Theme

Accent

Font

Corners

Density

Text size

Reset to Kanto
Data

kt-pagination

GitHub Copy link

Previous / next paging, with the position between them.

Preview

Previous / next paging, with the position between them.

<kt-pagination page="2" total-pages="7"></kt-pagination>pager.addEventListener('kt-page-change', (e) => load(e.detail.page));

<kt-table> uses it in its own footer; it is separate so a card list or a gallery can page the same way a table does.

The page number is aria-live="polite", so a change is announced without interrupting whatever the reader is already working through. The element clamps to the range: it will not emit a page below 1 or past total-pages.

API

PropertyAttributeTypeDefault
pagepagenumber1
totalPagestotal-pagesnumber1
labellabelstring'Pagination'
EventDetail
kt-page-change{ page: number }
PartDescription
previousThe previous button
nextThe next button
infoThe "Page 2 / 7" text