The Pagination
component allows users to navigate through multiple pages of content, such as search results or a list of items. It supports dynamic rendering, customization, and accessibility.
Below is an example of a basic Pagination
component:
<nav class="pagination">
<div class="item prev"><a href="#"></a></div>
<div class="item"><a href="#">1</a></div>
<div class="item active"><a href="#">2</a></div>
<div class="item"><a href="#">3</a></div>
<div class="item next"><a href="#"></a></div>
</nav>
Key details for customizing and utilizing the Pagination
component:
--gap
: Space between pagination items.--color
: Text color of pagination links.--bg
: Background color of pagination.--item-bg
: Background color of pagination items.--item-hover-bg
: Color of the hovered pagination item.--item-active-bg
: Color of the active pagination item..active
class to the current page's .item
.<nav>
and proper ARIA attributes for accessibility.