Seven ways to move through pages. The current page lifts onto surface and slides to where you clicked.
FreeWeb and Mobile7 variantsMotion
Preview
npx shadcn add @fetaui/paginationPlayground
Page Item
numbered
simple
compact
table
jump
load-more
dots
Kind
Icons animation
Motion
Installation
Terminal· bash
npx shadcn add @fetaui/pagination
Accessibility
- A nav labelled Pagination.
- The current page uses aria-current.
- Arrows are labelled Previous page and Next page. Reaching the end moves focus to the other arrow.
- Dots are buttons with full names, like Go to slide 3.
Motion
- The active pill slides to the new page on a spring, and page numbers, ranges and counts flow digit by digit to their new values.
- An ellipsis grows into the jump field and focus moves in.
- The Load more track fills in 240 ms.
- The active dot stretches from 6 to 20 over 200 ms, and seen dots darken.
- With reduced motion, the pill jumps and the track fills at once.
Responsive behavior
- 32 px items on Web and 40 px on Mobile.
- Numbered drops the Previous and Next labels on Mobile and keeps the arrows.
Performance
- Numbered draws the first, last and current pages with neighbours, so a thousand pages stay about seven buttons. Simple draws every page.
- The active pill is one shared layout element on its own layer, so the numbers never move.
- The Load more track animates scaleX, a transform.
Note for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Import Pagination from @/components/fetaui/pagination after installing it. PageItem is exported for custom trays.
- kind is numbered, simple, compact, table, jump, load-more or dots. Use page and onPageChange, or defaultPage.
- table works out its own last page from total and perPage, and takes onPerPageChange. Without total it shows Page n of pages. load-more needs shown, total, step and onLoadMore. For dots, pages is the slide count.
- Load more in the demo only raises a counter, so fetch your rows there. Composes Button, IconButton, Input and Select.
Related
Lens PagerComponentPaging through a lens, for moments where paging is the experience.Data TableComponentSort, search, filter, page and act in bulk on one set of records, with Data Table Header and Table Toolbar on the tray.TableComponentNative table parts on one cell component, in Compact or Comfortable density and Plain or Grid style.CarouselComponentA rail of tall cards. The centred card grows to 106% and shows its price.BreadcrumbComponentShows where the current page sits and lets people step back up.