Bootstrap 5 Pagination
Create "Previous/Next" or "Next n" controls with Bootstrap's pagination classes.
.pagination class does just what its name promises — it provides pagination.
Pagination is typically where you have navigation that links to multiple pages within a series. For example, search results that return many pages will have pagination that enables the user to navigate to the next page or even jump forward several pages.
To create default pagination, add
class="pagination" to the
<ul> element that represents the list of pages.
Also, in the name of semantic HTML, it should be enclosed in a
<nav> element with a descriptive
aria-label to reflect its purpose.
Active State for Current Page
.active class to the
<li> element that represents the current page (the page that the user is currently on).
Disabling an Option
.disabled class to the
<li> element to disable that option.
Add either the
.pagination-sm to the
<ul> element to increase or decrease the size of the pagination controls.