Pagination
Overview
Use the .bsk-pagination
class for navigating within large collections of items, such as
lists or tables.
Use the .bsk-pager
class as a simpler alternative to pagination.
Use the aria-label
element so assistive technologies can tell each pagination or pager instance apart.
Heads up! Pagination and pagers are not yet fully styled, but will be in the next version of the Style Kit.
Variants
Default pagination
<nav aria-label="pagination-example-1">
<ul class="bsk-pagination">
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="bsk-page-item bsk-active"><a href="#" class="bsk-page-link">1 <span class="bsk-visually-hidden">(current)</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">2</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">3</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">4</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">5</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Next"><span aria-hidden="true">»</span></a></li>
</ul>
</nav>
Simple pager
<nav aria-label="pager-example-1">
<ul class="bsk-pager">
<li><a href="#"><span aria-hidden="true">←</span> Previous</a></li>
<li><a href="#">Next <span aria-hidden="true">→</span></a></li>
</ul>
</nav>
Sizes
Add one of these classes to alter the size of a pagination instance:
Pagination Size | Pagination Group Size Class |
---|---|
Large | .bsk-pagination-lg |
Small | .bsk-pagination-sm |
These classes don’t apply to the pager.
<nav aria-label="pagination-example-2">
<ul class="bsk-pagination bsk-pagination-sm">
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">1 <span class="bsk-visually-hidden">(current)</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">2</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">3</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">4</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">5</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Next"><span aria-hidden="true">»</span></a></li>
</ul>
</nav>
<nav aria-label="pagination-example-3">
<ul class="bsk-pagination">
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">1 <span class="bsk-visually-hidden">(current)</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">2</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">3</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">4</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">5</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Next"><span aria-hidden="true">»</span></a></li>
</ul>
</nav>
<nav aria-label="pagination-example-4">
<ul class="bsk-pagination bsk-pagination-lg">
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">1 <span class="bsk-visually-hidden">(current)</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">2</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">3</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">4</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">5</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Next"><span aria-hidden="true">»</span></a></li>
</ul>
</nav>
States
Active item
Add the .bsk-active
class to indicate the current pagination item.
The active state doesn’t apply to the pager.
<nav aria-label="pagination-example-5">
<ul class="bsk-pagination">
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="bsk-page-item bsk-active"><a href="#" class="bsk-page-link">1 <span class="bsk-visually-hidden">(current)</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">2</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">3</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">4</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">5</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Next"><span aria-hidden="true">»</span></a></li>
</ul>
</nav>
Disabled item
Add the .bsk-disabled
class to indicate unavailable items or actions.
<nav aria-label="pagination-example-6">
<ul class="bsk-pagination">
<li class="bsk-page-item bsk-disabled"><a href="#" class="bsk-page-link" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">1 <span class="bsk-visually-hidden">(current)</span></a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">2</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">3</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">4</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link">5</a></li>
<li class="bsk-page-item"><a href="#" class="bsk-page-link" aria-label="Next"><span aria-hidden="true">»</span></a></li>
</ul>
</nav>
<nav aria-label="pager-example-2">
<ul class="bsk-pager">
<li class="bsk-disabled"><a href="#"><span aria-hidden="true">←</span> Previous</a></li>
<li><a href="#">Next <span aria-hidden="true">→</span></a></li>
</ul>
</nav>
Layouts
Pager alignment
Add the .bsk-previous
and .bsk-next
classes to position pager elements to the sides.
<nav aria-label="pager-example-3">
<ul class="bsk-pager">
<li class="bsk-previous"><a href="#"><span aria-hidden="true">←</span> Older</a></li>
<li class="bsk-next"><a href="#">Newer <span aria-hidden="true">→</span></a></li>
</ul>
</nav>