The pagination component consists of several elements:
pagination-previous
and pagination-next
for incremental navigation
pagination-list
which displays page items:
pagination-link
for the page numbers
pagination-ellipsis
for range separators
All elements are optional so you can compose your pagination as you wish.
HTML
<nav class= "pagination" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li>
<a class= "pagination-link" aria-label= "Goto page 1" > 1</a>
</li>
<li>
<span class= "pagination-ellipsis" > … </span>
</li>
<li>
<a class= "pagination-link" aria-label= "Goto page 45" > 45</a>
</li>
<li>
<a class= "pagination-link is-current" aria-label= "Page 46" aria-current= "page" > 46</a>
</li>
<li>
<a class= "pagination-link" aria-label= "Goto page 47" > 47</a>
</li>
<li>
<span class= "pagination-ellipsis" > … </span>
</li>
<li>
<a class= "pagination-link" aria-label= "Goto page 86" > 86</a>
</li>
</ul>
</nav>
You can disable some links if they are not active, or change the amount of page numbers available.
HTML
<nav class= "pagination" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" title= "This is the first page" disabled > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li>
<a class= "pagination-link is-current" aria-label= "Page 1" aria-current= "page" > 1</a>
</li>
<li>
<a class= "pagination-link" aria-label= "Goto page 2" > 2</a>
</li>
<li>
<a class= "pagination-link" aria-label= "Goto page 3" > 3</a>
</li>
</ul>
</nav>
By default on tablet , the list is located on the left, and the previous/next buttons on the right. But you can change the order of these elements by using the is-centered
and is-right
modifiers.
HTML
<nav class= "pagination is-centered" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li><a class= "pagination-link" aria-label= "Goto page 1" > 1</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 45" > 45</a></li>
<li><a class= "pagination-link is-current" aria-label= "Page 46" aria-current= "page" > 46</a></li>
<li><a class= "pagination-link" aria-label= "Goto page 47" > 47</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 86" > 86</a></li>
</ul>
</nav>
HTML
<nav class= "pagination is-right" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li><a class= "pagination-link" aria-label= "Goto page 1" > 1</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 45" > 45</a></li>
<li><a class= "pagination-link is-current" aria-label= "Page 46" aria-current= "page" > 46</a></li>
<li><a class= "pagination-link" aria-label= "Goto page 47" > 47</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 86" > 86</a></li>
</ul>
</nav>
Styles
#
Add the is-rounded
modifier to have rounded pagination items.
HTML
<nav class= "pagination is-rounded" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li><a class= "pagination-link" aria-label= "Goto page 1" > 1</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 45" > 45</a></li>
<li><a class= "pagination-link is-current" aria-label= "Page 46" aria-current= "page" > 46</a></li>
<li><a class= "pagination-link" aria-label= "Goto page 47" > 47</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 86" > 86</a></li>
</ul>
</nav>
Sizes
#
The pagination comes in 3 additional sizes .
You only need to append the modifier is-small
, is-medium
, or is-large
to the pagination
component.
HTML
<nav class= "pagination is-small" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li><a class= "pagination-link" aria-label= "Goto page 1" > 1</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 45" > 45</a></li>
<li><a class= "pagination-link is-current" aria-label= "Page 46" aria-current= "page" > 46</a></li>
<li><a class= "pagination-link" aria-label= "Goto page 47" > 47</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 86" > 86</a></li>
</ul>
</nav>
HTML
<nav class= "pagination is-medium" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li><a class= "pagination-link" aria-label= "Goto page 1" > 1</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 45" > 45</a></li>
<li><a class= "pagination-link is-current" aria-label= "Page 46" aria-current= "page" > 46</a></li>
<li><a class= "pagination-link" aria-label= "Goto page 47" > 47</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 86" > 86</a></li>
</ul>
</nav>
HTML
<nav class= "pagination is-large" role= "navigation" aria-label= "pagination" >
<a class= "pagination-previous" > Previous</a>
<a class= "pagination-next" > Next page</a>
<ul class= "pagination-list" >
<li><a class= "pagination-link" aria-label= "Goto page 1" > 1</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 45" > 45</a></li>
<li><a class= "pagination-link is-current" aria-label= "Page 46" aria-current= "page" > 46</a></li>
<li><a class= "pagination-link" aria-label= "Goto page 47" > 47</a></li>
<li><span class= "pagination-ellipsis" > … </span></li>
<li><a class= "pagination-link" aria-label= "Goto page 86" > 86</a></li>
</ul>
</nav>
Variables
#
Name
Type
Value
Computed Value
Computed Type
$ pagination-item-font-size
size
$ pagination-item-padding-left
size
$ pagination-item-padding-right
size
$ pagination-nav-padding-left
size
$ pagination-nav-padding-right
size
$ pagination-hover-border-color
variable
color
$ pagination-focus-border-color
variable
color
$ pagination-active-border-color
variable
color
$ pagination-disabled-color
variable
color
$ pagination-disabled-background-color
variable
color
$ pagination-disabled-border-color
variable
color
$ pagination-current-color
variable
color
$ pagination-current-background-color
variable
color
$ pagination-current-border-color
variable
color
$ pagination-ellipsis-color
variable
color
size
inset 0 1 px 2 px rgba ( $ scheme-invert , 0 . 2 )