Skip to content

Navigation

Pagination

Also calledpage navigationpage numbers

Controls for moving between pages of a longer list, usually with page numbers and previous or next links.

How people describe it

  • “numbered links below a list of results”
  • “previous and next buttons beside page numbers”
  • “row of numbers with the current page highlighted”

Good for

  • Search results split into pages
  • Long product or article lists

Don’t mix it up with

  • Shows a hierarchy of parent pages rather than positions in a result list.

What your library calls it

LIBRARYCALLS IT
shadcn/uiPagination

Accessibility checklist

  • Label the navigation and each numbered page link
  • Mark the current page with aria-current="page"
  • Provide visible focus, 44px targets, and wrapping

Try it

Click a page or an arrow. Long lists collapse into … gaps.

Prompt

Add pagination with page links and a marked current page.

~15 estimated prompt tokensDetailed: ~65 estimated prompt tokens

Rough estimate for prompt text only; actual counts vary by model and context.

<nav aria-label="Results pages">
  <ul style="display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0">
    <li><a href="?page=1" aria-label="Page 1" style="display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px">1</a></li>
    <li><a href="?page=2" aria-label="Page 2" aria-current="page" style="display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px; font-weight:bold">2</a></li>
    <li><a href="?page=3" aria-label="Page 3" style="display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px">3</a></li>
  </ul>
</nav>

Used in

Explore website blueprints that use this component.