Bootstrap 5 pagination is the process of displaying limited number of result on the every page. It enhances website performance as well as it appearance.
Steps to create bootstrap 5 pagination:
<nav>
element base class. .pagination
to <ul>
element base class..page-item
to <li>
element base class..page-link
to every <a>
element base class.Note:Follow the above mention steps to create simple bootstrap pagination.
Note: To make an active page item, assign .active
to the page item base class.
To disable any page item, you have to add .disabled
class to any page item <li>
element base class.
Note:
To make a disabled page item, assign .disabled
to the page item(<li>
) base class.
Note:To make an active & disabled page item, assign .active
&
.disabled
to the page item(<li>
) base class respectively.
Steps to assign pagination size:
.pagination-sm
to unordered list <ul>
element base class.
.pagination-lg
to unordered list <ul>
Note:
Please keep in mind that,pagination size can be controlled by .pagination-sm
& .pagination-lg
.To create
small pagination item assign.pagination-sm
to the pagination container base class .
Note:
Please keep in mind that, to create a large paginated item assign .pagination-lg
to the pagination container base class.
Pagination alignment can be done easily by flexbox utilities classes.
To change pagination alignment,add flexbox utility classes inside unordered list container(<ul>
) base class.
Note: Please keep in mind that, the paginated item is by default left-aligned.
Note: Paginated items can be aligned horizontally center by providing .justify-content-center
to the <ul>
element base class.
Note:
Paginated items can be aligned right by providing .justify-content-end
to the <ul>
element base class.