loading

BS4 Pagination

Basic Pagination

You might want to add pagination to each page if your website has a lot of pages.

==== BUTTON MUKAVA ====

You may add the .pagination class to a <ul> element to create a simple pagination. Next, give each <li> element a .page-item class and each link inside a <li> a .page-link class:

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>
				
			

Active State

In order to “highlight” the current page, utilize the .active class:

==== BUTTON MUKAVA ====

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 active"><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>
				
			

Disabled State

Unclickable links belong to the .disabled class:

==== BUTTON MUKAVA ====

Example

				
					<ul class="pagination">
  <li class="page-item disabled"><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>
				
			

Pagination Sizing

Additionally, pagination blocks can have their size changed:

==== BUTTON MUKAVA ====

For bigger blocks, add class .pagination-lg; for smaller blocks, add class .pagination-sm.

Example

				
					<ul class="pagination pagination-lg">
  <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>

<ul class="pagination pagination-sm">
  <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>
				
			

Pagination Alignment

To modify the pagination’s alignment, use utility classes:

==== BUTTON MUKAVA ====

Example

				
					<!-- Default (left-aligned) -->
<ul class="pagination" style="margin:20px 0">
  <li class="page-item">...</li>
</ul>

<!-- Center-aligned -->
<ul class="pagination justify-content-center" style="margin:20px 0">
  <li class="page-item">...</li>
</ul>

<!-- Right-aligned -->
<ul class="pagination justify-content-end" style="margin:20px 0">
  <li class="page-item">...</li>
</ul>
				
			

Tip: See our BS4 Utilities Chapter for additional information on Bootstrap 4 Utility/Helper classes.

Breadcrumbs

Breadcrumbs are another type of pagination:

==== BUTTON MUKAVA ====

The current page’s position within a navigational hierarchy is indicated by the .breadcrumb and .breadcrumb-item classes:

Example

				
					<ul class="breadcrumb">
  <li class="breadcrumb-item"><a href="#">Photos</a></li>
  <li class="breadcrumb-item"><a href="#">Summer 2017</a></li>
  <li class="breadcrumb-item"><a href="#">Italy</a></li>
  <li class="breadcrumb-item active">Rome</li>
</ul>
				
			
Share this Doc

BS4 Pagination

Or copy link

Explore Topic