Kinetic Pagination

Page navigation with previous and next buttons, ellipsis for long ranges and a highlight that slides to the current page.

  • <kt-kinetic-pagination>
  • Navigation
  • No framework

Kinetic Pagination

The code

Copy the Kinetic Pagination

Fastest: press Copy on the card above for one complete file. To build it into your own project, use the files below: the markup, the styles, this component’s script and the shared effects script (effects.js) that every component uses.

<kt-kinetic-pagination total="24" page="8" label="Search results pages"></kt-kinetic-pagination>

<kt-kinetic-pagination total="5" page="2" label="Changelog pages"></kt-kinetic-pagination>

Attributes

NameWhat it doesDefault
totalNumber of pages.10
pageCurrent page, starting at 1.1
siblingsHow many page numbers to show on each side of the current page.1
labelAccessible name of the navigation landmark.Pagination
sfxSound-effect text on page change.ピタッ!

Keyboard and screen readers

  • A nav landmark with an aria-label; the current page has aria-current="page".
  • Every page button is labeled "Page N"; previous and next are labeled and set aria-disabled at the ends.
  • Left and Right Arrow, Home and End move focus between the buttons; Enter or Space opens the focused page.
  • A polite live region announces "Page N of M" after a change.
  • Fires a change event with the new page number.

Styling variables

Every look is a CSS variable: --kt-accent, --kt-accent-ink, --kt-radius-btn, --kt-surface-radius, --kt-surface-bg, --kt-border-w, --kt-comp-shadow and --font-sans. The copied file sets them all from your choices.

FAQ

Kinetic Pagination: questions answered

How do I use the Kinetic Pagination?

Press Copy on the card to get a complete HTML file, or copy the HTML, CSS and JavaScript tabs into your own page. In your markup the element is written as <kt-kinetic-pagination>.

Which attributes does <kt-kinetic-pagination> accept?

total, page, siblings, label, sfx. Each one is described in the attributes table on this page.

Is the Kinetic Pagination accessible?

A nav landmark with an aria-label; the current page has aria-current="page". Every page button is labeled "Page N"; previous and next are labeled and set aria-disabled at the ends. Left and Right Arrow, Home and End move focus between the buttons; Enter or Space opens the focused page. A polite live region announces "Page N of M" after a change. Fires a change event with the new page number.

Can I change the Kinetic Pagination colors, corners and font?

Yes. Use the options on this page: accent color, border radius, background, border, shadow and Google font. The copied code already contains your choices, and every one of them is a CSS variable you can edit later.