Skip to content

Range Pagination

A copy-paste pagination component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

PaginationHTMLCSSany framework

Copy into your project

HTML
<nav aria-label="Pagination" class="nuda-pg2-range">
  <span class="nuda-pg2-range__info">21–40 of 340</span>
  <label class="nuda-pg2-range__sizer">
    <span class="nuda-pg2-range__sizer-text">Rows</span>
    <select class="nuda-pg2-range__select" aria-label="Rows per page">
      <option value="10">10</option>
      <option value="20" selected>20</option>
      <option value="50">50</option>
    </select>
  </label>
  <div class="nuda-pg2-range__nav">
    <button class="nuda-pg2-range__btn" aria-label="Previous page">‹</button>
    <button class="nuda-pg2-range__btn" aria-label="Next page">›</button>
  </div>
</nav>
CSS
.nuda-pg2-range {
  width: 300px;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.nuda-pg2-range__info {
  font-size: .75rem;
  color: #999;
  font-variant-numeric: tabular-nums;
  animation: _nuda-pg2rangein .35s ease-out;
}

.nuda-pg2-range__sizer {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
  font-size: .7rem;
  color: #777;
}

.nuda-pg2-range__select {
  height: 44px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  color: #fafafa;
  font-size: .75rem;
  padding: 0 .5rem;
  cursor: pointer;
}

.nuda-pg2-range__select:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-pg2-range__nav {
  display: flex;
  gap: .4rem;
}

.nuda-pg2-range__btn {
  width: 44px;
  height: 44px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.1);
  background: #161616;
  color: #cfcfcf;
  cursor: pointer;
  transition: border-color .15s,color .15s;
}

.nuda-pg2-range__btn:hover {
  border-color: rgba(228,255,84,.4);
  color: #fafafa;
}

.nuda-pg2-range__btn:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

@keyframes _nuda-pg2rangein {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-pg2-range__info {
    animation: none !important;
  }
}

How to use Range Pagination

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More pagination components

← Browse all NudaUI components