Bulma | Pagination

Bulma is a FLexbox based open-source CSS framework and its completely free. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design.
The ‘pagination’ is a component used to indicate the existence of a series of related content across multiple pages. Pagination is used to enable navigation between pages on a website. The pagination component includes several other components that we have to add exclusively to design our content well. These components are listed below.

  • pagination-previous: It is used to navigate to the previous page.
  • pagination-next: It is used to navigate to the next page.
  • pagination-list: It is used to display different pages of the website.
    • pagination-link: It is to indicate the page number in the anchor tag.
    • pagination-ellipsis: It creates the range separators between the page numbers.

Example 1: This example shows simple Bulma pagination component.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
  <title>Bulma Pagination</title>
  <link rel='stylesheet' href=
  
  <!-- custom css -->
  <style>
    div.columns {
      margin-top: 80px;
    }
  </style>
</head>
  
<body>
  <div class='container'>
    <div class='columns is-mobile is-centered'>
      <div class='column is-10'>
        <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 href="#" class="pagination-link" 
                aria-label="Page 1">1</a>
            </li>
            <li>
              <a href="#" class="pagination-link 
                  is-current" aria-label="Goto page 2" 
                  aria-current="page">2</a>
            </li>
            <li>
              <a href="#" class="pagination-link" 
                aria-label="Goto page 3">3</a>
            </li>
            <li>
              <a href="#" class="pagination-link" 
                aria-label="Goto page 4">4</a>
            </li>
            <li>
              <a href="#" class="pagination-link" 
                aria-label="Goto page 5">5</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 6">6</a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</body>
  
</html>

chevron_right


Output:

Example 2: This example shows pagination of large number of pages.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
  <title>Bulma Pagination</title>
  <link rel='stylesheet' href=
  
  <!-- custom css -->
  <style>
    div.columns {
      margin-top: 80px;
    }
  </style>
</head>
  
<body>
  <div class='container'>
    <div class='columns is-mobile is-centered'>
      <div class='column is-10'>
        <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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 30">30</a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</body>
  
</html>

chevron_right


Output:



Example 3: This example shows pagination with different alignment.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
  <title>Bulma Pagination</title>
  <link rel='stylesheet' href=
  
  <!-- custom css -->
  <style>
    div.columns {
      margin-top: 80px;
    }
  
    .pagination {
      margin-bottom: 20px;
    }
  </style>
</head>
  
<body>
  <div class='container'>
    <div class='columns is-mobile is-centered'>
      <div class='column is-10'>
        <nav class="pagination has-background-primary"
          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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 30">30</a>
            </li>
          </ul>
        </nav>
  
        <nav class="pagination is-centered 
            has-background-success" 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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 30">30</a>
            </li>
  
          </ul>
        </nav>
  
        <nav class="pagination is-right 
            has-background-info" 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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 30">30</a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</body>
  
</html>

chevron_right


Output:

Example 4: This example shows pagination with different sizes.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
  <title>Bulma Pagination</title>
  <link rel='stylesheet' href=
  
  <!-- custom css -->
  <style>
    div.columns {
      margin-top: 80px;
    }
  
    .pagination {
      margin-bottom: 20px;
    }
  </style>
</head>
  
<body>
  <div class='container'>
    <div class='columns is-mobile is-centered'>
      <div class='column is-10'>
        <nav class="pagination is-small 
            has-background-primary" 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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 30">30</a>
            </li>
          </ul>
        </nav>
        <nav class="pagination is-medium 
            has-background-success" 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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 30">30</a>
            </li>
          </ul>
        </nav>
  
        <nav class="pagination is-large 
            has-background-info" 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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                  aria-label="Goto page 30">30</a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</body>
  
</html>

chevron_right


Output:

Example 5: This example shows rounded pagination feature.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
  <title>Bulma Pagination</title>
  <link rel='stylesheet' href=
  
  <!-- custom css -->
  <style>
    div.columns {
      margin-top: 80px;
    }
  
    .pagination {
      margin-bottom: 20px;
    }
  </style>
</head>
  
<body>
  <div class='container'>
    <div class='columns is-mobile is-centered'>
      <div class='column is-10'>
        <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>
              <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>
            <li>
              <span class="pagination-ellipsis">
                
              </span>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 26">26</a>
            </li>
            <li>
              <a class="pagination-link is-current" 
                  aria-label="Page 27" 
                  aria-current="page">27</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 28">28</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 29">29</a>
            </li>
            <li>
              <a class="pagination-link" 
                aria-label="Goto page 30">30</a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</body>
  
</html>

chevron_right


Output:

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.