Cursor Pager
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-cursor">
<button class="nuda-pg2-cursor__btn nuda-pg2-cursor__btn--disabled" aria-disabled="true" aria-label="Previous page">
<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M15 6l-6 6 6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>
</button>
<span class="nuda-pg2-cursor__label">Page 1</span>
<button class="nuda-pg2-cursor__btn" aria-label="Next page">
<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M9 6l6 6-6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>
</button>
</nav>CSS
.nuda-pg2-cursor {
display: inline-flex;
align-items: center;
gap: .75rem;
}
.nuda-pg2-cursor__btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
border-radius: 10px;
border: 1px solid rgba(255,255,255,.1);
background: #161616;
color: #cfcfcf;
cursor: pointer;
transition: transform .15s,border-color .15s,color .15s;
}
.nuda-pg2-cursor__btn:hover {
border-color: rgba(228,255,84,.4);
color: #fafafa;
transform: translateY(-1px);
}
.nuda-pg2-cursor__btn:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
.nuda-pg2-cursor__btn--disabled {
opacity: .35;
cursor: not-allowed;
pointer-events: none;
}
.nuda-pg2-cursor__label {
font-size: .78rem;
color: #999;
min-width: 56px;
text-align: center;
font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion:reduce) {
.nuda-pg2-cursor__btn {
transition: none;
}
.nuda-pg2-cursor__btn:hover {
transform: none;
}
}
How to use Cursor Pager
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.