Pagination

Pagination is used to display a series of related content exists across multiple pages. You can navigate to any page by clicking the pagination links from the pagination.

How to use

Create a unordered list and add the .pagination class to the <ul> element. Add the .page-item to each <li> element and .page-link class to each link inside <li>.

Note
Accessibility

To support assistive technologies – such as screen readers wrap pagination with <nav> element to identify it as a navigation section to screen readers and other assistive technologies. A page can have more than one navigation section so it is recommended to provide a descriptive aria-label for the<nav>. 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".

Working with icons

Use can also use an icon or symbol instead of text for some pagination links. For example you can use html symbols(arrows) or icons for "Next" and "Previous" links.

Note
Accessibility

When using icons provide proper screen reader support with aria attributes and the .sr-only utility.

Disabled and active states

You can customize Pagination links. Use .disabled for links that appear un-clickable and .active to indicate the current page.

The .disabled class uses pointer-events: none to disable the link functionality of <a>s. This CSS property is not yet standardized so always add tabindex="-1" on disabled links and use custom JavaScript to fully disable their functionality.

You can also omit the anchor in the case of the prev/next arrows and wrap using <span> to remove click functionality and prevent keyboard focus which retains the intended styles.

Sizing

For larger pagination sizes add .pagination-lg and for smaller pagination sizes add .pagination-sm

Large
Small
Alignment

You can change the alignment of pagination components with flexbox utilities.

Align Center

Add .justify-content-center to align pagination in the center.

Align Right

Add .justify-content-end to align pagination to the right.

Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents