Search...

Pagination

Bootstrap 5 Pagination

Bootstrap 5 Pagination is a component that indicates the presence of a succession of linked content over numerous pages and allows navigation between them.

For pagination, we use a huge block of connected links, which makes connections easy to spot and scalable—all while delivering large hit zones. List HTML elements are used in pagination so that screen readers may announce the number of available links. We utilize a wrapping <nav> element to signal to screen readers and other assistive technology that this is a navigation section.

Default Pagination

HTML
html
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="#">Prev</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>

Rounded Pagination

To make your pagination links border rounded, use the page-link-round property.

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

Different Pagination Styling

HTML
html
<nav>
<ul class="pagination">
<li class="page-item">
<a class="page-link text-dark bg-light" href="#">
Prev
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-light" href="#">
1
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-light" href="#">
2
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-light" href="#">
3
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-light" href="#">
Next
</a>
</li>
</ul>
</nav>
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item">
<a class="page-link text-dark bg-warning" href="#">
Prev
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-warning" href="#">
1
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-warning" href="#">
2
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-warning" href="#">
3
</a>
</li>
<li class="page-item">
<a class="page-link text-dark bg-warning" href="#">
Next
</a>
</li>
</ul>
</nav>
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item">
<a class="page-link text-white bg-danger" href="#">
Prev
</a>
</li>
<li class="page-item">
<a class="page-link text-white bg-danger" href="#">
1
</a>
</li>
<li class="page-item">
<a class="page-link text-white bg-danger" href="#">
2
</a>
</li>
<li class="page-item">
<a class="page-link text-white bg-danger" href="#">
3
</a>
</li>
<li class="page-item">
<a class="page-link text-white bg-danger" href="#">
Next
</a>
</li>
</ul>
</nav>

Different Sizes

With the Contrast Bootstrap Pagination we can define the size of a pagination. Use pagination-lg to have a large pagination, and pagination-sm to have a small-sized pagination. The default size is medium.

HTML
html
<nav aria-label="Page navigation example">
<ul class="pagination pagination-lg">
<li class="page-item">
<a class="page-link" href="#">Prev</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">
<li class="page-item">
<a class="page-link" href="#">Prev</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 pagination-sm">
<li class="page-item">
<a class="page-link" href="#">Prev</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>

Build modern projects using Bootstrap 5 and Contrast

Trying to create components and pages for a web app or website from scratch while maintaining a modern User interface can be very tedious. This is why we created Contrast, to help drastically reduce the amount of time we spend doing that. so we can focus on building some other aspects of the project.

Contrast Bootstrap PRO consists of a Premium UI Kit Library featuring over 10000+ component variants. Which even comes bundled together with its own admin template comprising of 5 admin dashboards and 23+ additional admin and multipurpose pages for building almost any type of website or web app.
See a demo and learn more about Contrast Bootstrap Pro by clicking here.