Spectre.css CSS Framework

SPECTRE

DOCS
  • Installation
  • Variables
  • Custom version
  • Browser support
  • What's new
  • Buttons
  • Code
  • Forms
  • Icons
  • Labels
  • Media
  • Tables
  • Typography
  • Flexbox grid
  • Footer
  • Hero
  • Navbar
  • Responsive
  • Accordions
  • Avatars
  • Badges
  • Bars
  • Breadcrumbs
  • Cards
  • Chips
  • Empty states
  • Menu
  • Modals
  • Nav
  • Pagination
  • Panels
  • Popovers
  • Steps
  • Tabs
  • Tiles
  • Toasts
  • Tooltips
  • Colors
  • Cursors
  • Display
  • Divider
  • Loading
  • Position
  • Shapes
  • Text
  • 360-Degree Viewer
  • Autocomplete
  • Calendars
  • Carousels
  • Comparison sliders
  • Filters
  • Meters
  • Off-canvas
  • Parallax
  • Progress
  • Sliders
  • Timelines

Pagination#

  • Spectre.css
  • Components
  • Pagination
Pagination
  • Simple
  • Border
  • Border and icons
  • Active
  • Disabled
  • Colors

Colors

Add a container element with the pagination class. And add child elements with the page-item class. The page-item with the active class will be highlighted. You can add the disabled class to the page-item to have unclickable page links.

  • Previous
  • 1
  • ...
  • 4
  • 5
  • 6
  • ...
  • 9
  • Next
<ul class="pagination">
  <li class="page-item">
    <a href="#" tabindex="-1">Previous</a>
  </li>
  <li class="page-item">
    <a href="#">1</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">4</a>
  </li>
  <li class="page-item active">
    <a href="#">5</a>
  </li>
  <li class="page-item">
    <a href="#">6</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">9</a>
  </li>
  <li class="page-item">
    <a href="#">Next</a>
  </li>
</ul>
  • Previous
  • 1
  • 2
  • 3
  • ...
  • 9
  • Next
<ul class="pagination">
  <li class="page-item disabled">
    <a href="#" tabindex="-1">Previous</a>
  </li>
  <li class="page-item active">
    <a href="#">1</a>
  </li>
  <li class="page-item">
    <a href="#">2</a>
  </li>
  <li class="page-item">
    <a href="#">3</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">12</a>
  </li>
  <li class="page-item">
    <a href="#">Next</a>
  </li>
</ul>

Previous & next#

You could use previous and next pagination to navigate.

  • PreviousGetting started
  • NextLayout
<ul class="pagination">
  <li class="page-item page-prev">
    <a href="#">
      <span class="page-item-subtitle">Previous</span>
      <span class="page-item-title">Getting started</span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span class="page-item-subtitle">Next</span>
      <span class="page-item-title">Layout</span>
    </a>
  </li>
</ul>
Previous & next - Border#

Add the pagination-border class to main element to have border around page items.

  • Previous - Getting startedVariables
  • Getting started - NextBrowser support
<ul class="pagination pagination-border"> <!-- Add .pagination-border class here -->
  <li class="page-item page-prev">
    <a href="#">
      <span class="page-item-subtitle">Previous - Getting started</span>
      <span class="page-item-title">Variables</span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span class="page-item-subtitle">Getting started - Next</span>
      <span class="page-item-title">Browser support</span>
    </a>
  </li>
</ul>
Previous & next - Border with icons#

Add an additional pagination-icon class to main element and add icon <i class="fa-solid fa-arrow-left-long"></i> in the page item left and add item <i class="fa-solid fa-arrow-right-long"></i> in the page item right to have page item with arrows.

  • Getting started - PreviousVariables
  • Next - Getting startedBrowser support
<ul class="pagination pagination-border pagination-icon"> <!-- Add .pagination-icon class here -->
  <li class="page-item page-prev">
    <a href="#">
      <i class="fa-solid fa-arrow-left-long"></i>
      <span>
        <span class="page-item-subtitle">Previous</span>
        <span class="page-item-title">Getting started</span>
      </span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span>
        <span class="page-item-subtitle">Next</span>
        <span class="page-item-title">Layout</span>
      </span>
      <i class="fa-solid fa-arrow-right-long"></i>
    </a>
  </li>
</ul>

Pagination - State#

Pagination - State active#

To activate one of the pages add .active class to the element with the .page-item class.

  • Previous
  • 1
  • ...
  • 4
  • 5
  • 6
  • ...
  • 9
  • Next
<ul class="pagination">
  <li class="page-item">
    <a href="#" tabindex="-1">Previous</a>
  </li>
  <li class="page-item">
    <a href="#">1</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item active"> <!-- Add active class here -->
    <a href="#">4</a>
  </li>
  <li class="page-item">
    <a href="#">5</a>
  </li>
  <li class="page-item">
    <a href="#">6</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">9</a>
  </li>
  <li class="page-item">
    <a href="#">Next</a>
  </li>
</ul>

Activate the left or right page item by adding the .active class to the .page-prev or .page-next.

  • Getting started - PreviousVariables
  • Next - Getting startedBrowser support
<ul class="pagination pagination-border pagination-icon">
  <li class="page-item page-prev active"> <!-- Add class active here -->
    <a href="#">
      <i class="fa-solid fa-arrow-left-long"></i>
      <span>
        <span class="page-item-subtitle">Getting started - Previous</span>
        <span class="page-item-title">Variables</span>
      </span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span>
        <span class="page-item-subtitle">Next - Getting started</span>
        <span class="page-item-title">Browser support</span>
      </span>
      <i class="fa-solid fa-arrow-right-long"></i>
    </a>
  </li>
</ul>

Activate both, the left and right page items by adding the .active class to the .page-prev and .page-next, or add .active / .pagination-active to the container element.

  • Getting started - PreviousVariables
  • Next - Getting startedBrowser support
<ul class="pagination pagination-border pagination-icon active"> <!-- Add class active here -->
  <li class="page-item page-prev">
    <a href="#">
      <i class="fa-solid fa-arrow-left-long"></i>
      <span>
        <span class="page-item-subtitle">Getting started - Previous</span>
        <span class="page-item-title">Variables</span>
      </span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span>
        <span class="page-item-subtitle">Next - Getting started</span>
        <span class="page-item-title">Browser support</span>
      </span>
      <i class="fa-solid fa-arrow-right-long"></i>
    </a>
  </li>
</ul>
Pagination - Disabled#

To disable one of the pages add .disabled class to the element with the .page-item class.

  • Previous
  • 1
  • ...
  • 4
  • 5
  • 6
  • ...
  • 9
  • Next
<ul class="pagination">
  <li class="page-item">
    <a href="#" tabindex="-1">Previous</a>
  </li>
  <li class="page-item">
    <a href="#">1</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item active disabled"> <!-- Add .disabled class here -->
    <a href="#">4</a>
  </li>
  <li class="page-item">
    <a href="#">5</a>
  </li>
  <li class="page-item">
    <a href="#">6</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">9</a>
  </li>
  <li class="page-item">
    <a href="#">Next</a>
  </li>
</ul>

To disable pagination add .disabled / .pagination-disabled class to the container element with the pagination.

  • Previous
  • 1
  • ...
  • 4
  • 5
  • 6
  • ...
  • 9
  • Next
<ul class="pagination pagination-disabled"> <!-- Add .disabled / .pagination-disabled class here -->
  <li class="page-item">
    <a href="#" tabindex="-1">Previous</a>
  </li>
  <li class="page-item">
    <a href="#">1</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item active"> <!-- Add .disabled class here -->
    <a href="#">4</a>
  </li>
  <li class="page-item">
    <a href="#">5</a>
  </li>
  <li class="page-item">
    <a href="#">6</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">9</a>
  </li>
  <li class="page-item">
    <a href="#">Next</a>
  </li>
</ul>

To disable left or right page item add the .disabled class to the .page-prev or .page-next.

  • Getting started - PreviousVariables
  • Next - Getting startedBrowser support
<ul class="pagination pagination-border pagination-icon">
  <li class="page-item page-prev disabled"> <!-- Add disabled here -->
    <a href="#">
      <i class="fa-solid fa-arrow-left-long"></i>
      <span>
        <span class="page-item-subtitle">Getting started - Previous</span>
        <span class="page-item-title">Variables</span>
      </span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span>
        <span class="page-item-subtitle">Next - Getting started</span>
        <span class="page-item-title">Browser support</span>
      </span>
      <i class="fa-solid fa-arrow-right-long"></i>
    </a>
  </li>
</ul>

To disable both, left and right page items add to both .disabled class or add .disabled / .pagination-disabled class to the container element.

  • Getting started - PreviousVariables
  • Next - Getting startedBrowser support
<ul class="pagination pagination-border pagination-icon disabled"> <!-- Add .disabled here -->
  <li class="page-item page-prev">
    <a href="#">
      <i class="fa-solid fa-arrow-left-long"></i>
      <span>
        <span class="page-item-subtitle">Getting started - Previous</span>
        <span class="page-item-title">Variables</span>
      </span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span>
        <span class="page-item-subtitle">Next - Getting started</span>
        <span class="page-item-title">Browser support</span>
      </span>
      <i class="fa-solid fa-arrow-right-long"></i>
    </a>
  </li>
</ul>

Pagination - Colors#

The following table contains the available colors for the pagination. If the color dark is available then add to the class name suffix -dark, for example, to gray color pagination-gray-dark.

Code Available Dark Light
Dark pagination-dark
Light pagination-light
Accent pagination-accent
Primary pagination-primary
Secondary pagination-secondary
Gray pagination-gray
Bg pagination-bg
Border pagination-border*
Link pagination-link
Disabled pagination-disabled
Error pagination-error
Info pagination-info
Success pagination-success
Body bg pagination-body-bg
Body font pagination-body-font
Code pagination-code
Highlight pagination-highlight
Pagination - Accent color#

This is the only example of the accent color.

  • Previous
  • 1
  • ...
  • 4
  • 5
  • 6
  • ...
  • 9
  • Next
<ul class="pagination pagination-accent">
  <li class="page-item">
    <a href="#" tabindex="-1">Previous</a>
  </li>
  <li class="page-item ">
    <a href="#">1</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">4</a>
  </li>
  <li class="page-item active">
    <a href="#">5</a>
  </li>
  <li class="page-item">
    <a href="#">6</a>
  </li>
  <li class="page-item">
    <span>...</span>
  </li>
  <li class="page-item">
    <a href="#">9</a>
  </li>
  <li class="page-item">
    <a href="#">Next</a>
  </li>
</ul>
  • Getting started - PreviousVariables
  • Next - Getting startedBrowser support
<!-- Add accent here -->
<ul class="pagination pagination-border pagination-icon pagination-accent">
  <li class="page-item page-prev disabled"> <!-- Add disabled here -->
    <a href="#">
      <i class="fa-solid fa-arrow-left-long"></i>
      <span>
        <span class="page-item-subtitle">Getting started - Previous</span>
        <span class="page-item-title">Variables</span>
      </span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span>
        <span class="page-item-subtitle">Next - Getting started</span>
        <span class="page-item-title">Browser support</span>
      </span>
      <i class="fa-solid fa-arrow-right-long"></i>
    </a>
  </li>
</ul>
  • Getting started - PreviousVariables
  • Next - Getting startedBrowser support
<!-- Add accent here -->
<ul class="pagination pagination-border pagination-icon pagination-accent">
  <li class="page-item page-prev active"> <!-- Add active here -->
    <a href="#">
      <i class="fa-solid fa-arrow-left-long"></i>
      <span>
        <span class="page-item-subtitle">Getting started - Previous</span>
        <span class="page-item-title">Variables</span>
      </span>
    </a>
  </li>
  <li class="page-item page-next">
    <a href="#">
      <span>
        <span class="page-item-subtitle">Next - Getting started</span>
        <span class="page-item-title">Browser support</span>
      </span>
      <i class="fa-solid fa-arrow-right-long"></i>
    </a>
  </li>
</ul>
  • components - Previous
    Nav
  • Next - components
    Panels
Documentation
  • Getting started
  • Elements
  • Layout
  • Components
  • Utilities
  • Experimentals
Project
  • Demonstration
  • npm
  • GitHub
Community
  • Gettr
  • Twitter
  • YouTube
  • Discord
  • Gitter
Donate
  • PayPal Yan Zhu
  • Patreon Yan Zhu
  • angular package
Designed and built with ♥ by Yan Zhu. Modified with ♥ by the angular-package.
Version . Licensed under the MIT License