Pagination

Documentation and examples for showing pagination to indicate a series of related content exists across multiple pages.


Overview

We use a large block of connected links for our pagination, making links hard to miss and easily scalable—all while providing large hit areas. Pagination is built with list HTML elements so screen readers can announce the number of available links. Use a wrapping <nav> element to identify it as a navigation section to screen readers and other assistive technologies.

In addition, as pages likely have more than one such navigation section, it’s advisable to provide a descriptive aria-label for the <nav> to reflect its purpose. For example, if the pagination component is used to navigate between a set of search results, an appropriate label could be aria-label="Search results pages".

<nav aria-label="Page navigation example">
 <ul class="pagination">
    <li class="page-item"><a class="page-link" href="#">Previous</a></li>
    <li class="page-item"><a class="page-link" href="#">1</a></li>
    <li class="page-item"><a class="page-link" href="#">2</a></li>
    <li class="page-item"><a class="page-link" href="#">3</a></li>
    <li class="page-item"><a class="page-link" href="#">Next</a></li>
  </ul>
</nav>  

Working with icons

Looking to use an icon or symbol in place of text for some pagination links? Be sure to provide proper screen reader support with aria attributes.

<nav aria-label="Page navigation example">
  <ul class="pagination">
    <li class="page-item">
      <a class="page-link" href="#" aria-label="Previous">
        <span aria-hidden="true">&laquo;</span>
      </a>
    </li>
    <li class="page-item"><a class="page-link" href="#">1</a></li>
    <li class="page-item"><a class="page-link" href="#">2</a></li>
    <li class="page-item"><a class="page-link" href="#">3</a></li>
    <li class="page-item">
      <a class="page-link" href="#" aria-label="Next">
        <span aria-hidden="true">&raquo;</span>
      </a>
    </li>
  </ul>
</nav>

Default

Pagination sm
Pagination default
Pagination lg
<div class="col-12">
	<h5 class="text-center">Pagination sm</h5>
	<nav class="mb-5" aria-label="navigation">
	  <ul class="pagination pagination-sm d-inline-block d-md-flex justify-content-center">
	    <li class="page-item disabled">
	      <a class="page-link" href="#" tabindex="-1" aria-disabled="true">Prev</a>
	    </li>
	    <li class="page-item"><a class="page-link" href="#">1</a></li>
	    <li class="page-item active"><a class="page-link" href="#">2</a></li>
	    <li class="page-item disabled"><a class="page-link" href="#">..</a></li>
	    <li class="page-item"><a class="page-link" href="#">15</a></li>
	    <li class="page-item">
	      <a class="page-link" href="#">Next</a>
	    </li>
	  </ul>
	</nav>
	<h5 class="text-center">Pagination default</h5>
	<nav class="mb-5" aria-label="navigation">
	  <ul class="pagination d-inline-block d-md-flex justify-content-center">
	    <li class="page-item disabled">
	      <a class="page-link" href="#" tabindex="-1" aria-disabled="true">Prev</a>
	    </li>
	    <li class="page-item"><a class="page-link" href="#">1</a></li>
	    <li class="page-item active"><a class="page-link" href="#">2</a></li>
	    <li class="page-item disabled"><a class="page-link" href="#">..</a></li>
	    <li class="page-item"><a class="page-link" href="#">15</a></li>
	    <li class="page-item">
	      <a class="page-link" href="#">Next</a>
	    </li>
	  </ul>
	</nav>
	<h5 class="text-center">Pagination lg</h5>
	<nav class="mb-5" aria-label="navigation">
	  <ul class="pagination pagination-lg d-inline-block d-md-flex justify-content-center">
	    <li class="page-item disabled">
	      <a class="page-link" href="#" tabindex="-1" aria-disabled="true">Prev</a>
	    </li>
	    <li class="page-item"><a class="page-link" href="#">1</a></li>
	    <li class="page-item active"><a class="page-link" href="#">2</a></li>
	    <li class="page-item disabled"><a class="page-link" href="#">..</a></li>
	    <li class="page-item"><a class="page-link" href="#">15</a></li>
	    <li class="page-item">
	      <a class="page-link" href="#">Next</a>
	    </li>
	  </ul>
	</nav>
</div>

Bordered pagination

<div class="col-12">
	<nav class="mb-4 d-flex justify-content-center" aria-label="navigation">
		<ul class="pagination pagination-bordered ">
			<li class="page-item disabled">
				<a class="page-link" href="#" tabindex="-1" aria-disabled="true">Prev</a>
			</li>
			<li class="page-item"><a class="page-link" href="#">1</a></li>
			<li class="page-item active"><a class="page-link" href="#">2</a></li>
			<li class="page-item disabled"><a class="page-link" href="#">..</a></li>
			<li class="page-item"><a class="page-link" href="#">15</a></li>
			<li class="page-item">
				<a class="page-link" href="#">Next</a>
			</li>
		</ul>
	</nav>
</div>

Jump pagination

<nav class="mb-5 d-lg-flex justify-content-between" aria-label="navigation">
  <!-- Pagination 1 2 3  -->
  <ul class="pagination pagination-bordered justify-content-center d-inline-block d-lg-flex">
    <li class="page-item">
      <a class="page-link" href="#">First</a>
    </li>
    <li class="page-item"><a class="page-link" href="#">1</a></li>
    <li class="page-item active"><a class="page-link" href="#">2</a></li>
    <li class="page-item disabled"><a class="page-link" href="#">..</a></li>
    <li class="page-item"><a class="page-link" href="#">22</a></li>
    <li class="page-item"><a class="page-link" href="#">23</a></li>
    <li class="page-item">
      <a class="page-link" href="#">Last</a>
    </li>
  </ul>
  <!-- Pagination jump -->
  <ul class="pagination pagination-bordered justify-content-center d-none d-lg-flex">
    <li class="page-item disabled">
      <span class="page-link">Total 25 pages</span>
    </li>
    <li class="page-item disabled">
      <span class="page-link">|</span>
    </li>
    <li class="page-item disabled">
      <span class="page-link">Go to page:</span>
    </li>
    <li class="page-item">
      <input class="form-control h-100 icon-lg fs-6" type="text" placeholder="12">
    </li>
    <li class="page-item active">
      <a class="page-link" href="#">Jump <i class="bi bi-arrow-90deg-right ms-2"></i></a>
    </li>
  </ul>
</nav>

Full width pagination

<nav class="my-5" aria-label="navigation">
	<ul class="pagination pagination-bordered d-flex justify-content-between">
		<li>
			<ul class="list-unstyled">
				<li class="page-item">
					<a class="page-link" href="#">First</a>
				</li>
			</ul>
		</li>
		<li>
			<ul class="list-unstyled">
				<li class="page-item"><a class="page-link" href="#">1</a></li>
				<li class="page-item active"><a class="page-link" href="#">2</a></li>
				<li class="page-item disabled"><a class="page-link" href="#">..</a></li>
				<li class="page-item"><a class="page-link" href="#">22</a></li>
				<li class="page-item"><a class="page-link" href="#">23</a></li>
			</ul>
		</li>
		<li>
			<ul class="list-unstyled">
				<li class="page-item">
					<a class="page-link" href="#">Last</a>
				</li>
			</ul>
		</li>
	</ul>
</nav>

Newer Older Pagination

<nav class="mt-5" aria-label="navigation">
    <ul class="pagination d-flex justify-content-between">
      <li class="page-item flex-fill text-center">
        <a href="#" class="page-link"> <i class="fas fa-long-arrow-alt-left me-2 rtl-flip"></i> Older</a>
      </li>
      <li class="page-item flex-fill text-center">
        <a href="#" class="page-link">Newer <i class="fas fa-long-arrow-alt-right ms-2 rtl-flip"></i></a>
      </li>
    </ul>
 </nav>

Load more button Pagination

<div class="col-12 text-center mt-5">
	<button type="button" class="btn btn-primary-soft">Load more post <i class="bi bi-arrow-down-circle align-middle ms-2"></i&	gt;</button>
</div>
<div class="col-12 text-center mt-3">
	<button type="button" class="btn btn-primary-soft w-100">Load more post <i class="bi bi-arrow-down-circle ms-2 align-middle"></i></button>
</div>

Alignment

Change the alignment of pagination components with flexbox utilities.

<nav aria-label="Page navigation example">
  <ul class="pagination justify-content-start">
    <li class="page-item disabled">
      <a class="page-link" href="#" tabindex="-1" aria-disabled="true">Previous</a>
    </li>
    <li class="page-item"><a class="page-link" href="#">1</a></li>
    <li class="page-item"><a class="page-link" href="#">2</a></li>
    <li class="page-item"><a class="page-link" href="#">3</a></li>
    <li class="page-item">
      <a class="page-link" href="#">Next</a>
    </li>
  </ul>
</nav>
<nav aria-label="Page navigation example">
  <ul class="pagination justify-content-end">
    <li class="page-item disabled">
      <a class="page-link" href="#" tabindex="-1" aria-disabled="true">Previous</a>
    </li>
    <li class="page-item"><a class="page-link" href="#">1</a></li>
    <li class="page-item"><a class="page-link" href="#">2</a></li>
    <li class="page-item"><a class="page-link" href="#">3</a></li>
    <li class="page-item">
      <a class="page-link" href="#">Next</a>
    </li>
  </ul>
</nav>