Build Components

Ladder

Pagination. Numbered pages with gaps, previous and next, as links or as buttons.

Component
Pagination
Pattern
Navigation + aria-current
Outputs
React + Tailwind, HTML/CSS/JS
Status
In stock, tested

Test bench

Runs the exported code, not a mock-up.

Output

Ladder · React + TailwindFull width

Keyboard map
KeysWhat happens
TaborShift + TabMove along the controls: previous, the page numbers, next.
EnterorSpaceGo to the focused page.

Take it home

React + Tailwind CSS v4: install with one command, or copy the file. Your options are already in it.

npx shadcn@latest add "/r/pagination.json"

Run it in your project root. It writes components/pagination.tsx with the options you set here. Needs Tailwind CSS v4 and a project set up for the shadcn CLI (npx shadcn@latest init).