Pagination
Previous, Next and the pages between them, as buttons or links. The pill slides to the current page and the numbers roll as the range moves.
npx shadcn add https://kinoui.com/r/pagination.jsonCopy install command
Examples
Default
Hold the page, and show the rows that go with it. The pill slides to the page you pick, and a backdrop follows the pointer.
Events 721–740 of 4,800
Many pages
An ellipsis stands for each run of pages between the ends and the current one. The row keeps its width, so the numbers roll past the pill.
Links
Give href and every page is a link to its own address. To draw them with your router’s Link, give renderLink as well.
Narrow
Short of room, Previous and Next keep only their arrows. A row still too wide shows fewer pages around the current one.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/pagination.json- Files
lib/controllable.tslib/reduce-motion.tslib/resize.tslib/run-progress.tslib/highlight.tslib/pill.tslib/refs.tslib/roll.tsxlib/swap.tsxcomponents/kino/pagination.tsx- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Pagination
PaginationPages
Data attributes
Accessibility
- It is a
navlandmark, named Pagination unless you givearia-label. Name each one when a page has several. - Each page is a button, or a link with
href, namedPage 4, and the current onePage 6 of 18, so the count is known even when the last page doesn’t show: the number rolls for the eye, and the name is read whole. The current one hasaria-current="page". - Previous on the first page and Next on the last stay in the tab order with
aria-disabled, so focus isn’t lost when you reach an end. When only their arrows show, their words are still their names. - The ellipses are hidden from screen readers: the pages around them say where you are.
- A page you press can roll to another place as the range moves: focus goes with it.
- In forced colours the pill takes the system highlight, and a disabled Previous or Next turns GrayText.
- When the system asks for less motion, the pill moves at once and the numbers change without rolling.