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.

Accessibility
  • Use a wrapping <nav> element to mark it as a navigation section
  • Provide a descriptive aria-label for the <nav> element 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>  

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>

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>

Load more button Pagination

<a href="#!" role="button" class="btn btn-loader btn-outline-primary mb-0" data-bs-toggle="button" aria-pressed="true">
	<span class="load-text">Load more work</span>
	<div class="load-icon">
		<div class="spinner-grow spinner-grow-sm bg-primary" role="status">
			<span class="visually-hidden">Loading...</span>
		</div>
	</div>
</a>

Pagination primary grad

<nav aria-label="Page navigation">
	<ul class="pagination pagination-primary-grad">
		<li class="page-item disabled">
			<a class="page-link"><i class="bi bi-chevron-left mx-n1"></i></a>
		</li>
		<li class="page-item active" aria-current="page">
			<span class="page-link">
				1
				<span class="visually-hidden">(current)</span>
			</span>
		</li>
		<li class="page-item">
			<a href="#" class="page-link">2</a>
		</li>
		<li class="page-item">
			<a href="#" class="page-link">3</a>
		</li>
		<li class="page-item">
			<a href="#" class="page-link">4</a>
		</li>
		<li class="page-item">
			<a href="#" class="page-link" aria-label="Next page">
				<i class="bi bi-chevron-right mx-n1"></i>
			</a>
		</li>
	</ul>
</nav>