Pagination
Navigate between pages of content with page numbers, prev/next buttons.
Default
Standard pagination with page numbers, ellipsis, and previous/next navigation.
html
<nav class="vt-pagination">
<!-- Previous -->
<button class="vt-page-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
Previous
</button>
<!-- Page 1 -->
<button class="vt-page-btn">1</button>
<!-- Page 2 (active) -->
<button class="vt-page-btn vt-active">2</button>
<!-- Page 3 -->
<button class="vt-page-btn">3</button>
<!-- Ellipsis -->
<span class="vt-pagination-ellipsis">…</span>
<!-- Page 10 -->
<button class="vt-page-btn">10</button>
<!-- Next -->
<button class="vt-page-btn">
Next
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
</nav>
Simple
Just previous and next buttons without page numbers. Good for mobile or simpler layouts.
html
<nav class="vt-pagination">
<!-- Previous -->
<button class="vt-page-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
Previous
</button>
<!-- Next -->
<button class="vt-page-btn">
Next
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
</nav>
With Page Size
Pagination with a page size selector to control the number of items per page.
html
<nav class="vt-flex vt-items-center vt-gap-6">
<!-- Page size selector -->
<div class="vt-flex vt-items-center vt-gap-2">
<span class="vt-body-sm vt-text-foreground-muted">Rows per page</span>
<div class="vt-select-wrapper vt-relative">
<div id="page-size-trigger" class="vt-select-trigger vt-select-trigger-sm" role="button" tabindex="0" aria-label="Rows per page" aria-haspopup="listbox" onclick="veritheme.toggleSelect('page-size-dd')">
<span>10</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
<path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</div>
<div id="page-size-dd" class="vt-select-dropdown" role="listbox" aria-label="Rows per page">
<div class="vt-select-item selected" role="option" aria-selected="true" onclick="veritheme.selectItem('page-size-dd','page-size-trigger','10')">10</div><div class="vt-select-item" role="option" aria-selected="false" onclick="veritheme.selectItem('page-size-dd','page-size-trigger','20')">20</div><div class="vt-select-item" role="option" aria-selected="false" onclick="veritheme.selectItem('page-size-dd','page-size-trigger','50')">50</div><div class="vt-select-item" role="option" aria-selected="false" onclick="veritheme.selectItem('page-size-dd','page-size-trigger','100')">100</div>
</div>
</div>
</div>
<!-- Page info -->
<span class="vt-pagination-info">Page <strong>2</strong> of <strong>10</strong></span>
<!-- Page navigation -->
<div class="vt-pagination">
<button class="vt-page-btn" title="Previous page" aria-label="Previous page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
<button class="vt-page-btn">1</button>
<button class="vt-page-btn vt-active">2</button>
<button class="vt-page-btn">3</button>
<span class="vt-pagination-ellipsis">…</span>
<button class="vt-page-btn">10</button>
<button class="vt-page-btn" title="Next page" aria-label="Next page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
</div>
</nav>
Compact
A smaller, minimal pagination showing the current page out of the total, with arrow navigation.
html
<nav class="vt-pagination">
<!-- Previous arrow -->
<button class="vt-page-btn vt-page-btn-sm" aria-label="Previous page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
<!-- Page info -->
<span class="vt-pagination-info">Page <strong>1</strong> of <strong>10</strong></span>
<!-- Next arrow -->
<button class="vt-page-btn vt-page-btn-sm" aria-label="Next page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
</nav>
With Icons
Icon-based navigation with first, previous, next, and last page controls using chevron icons.
html
<nav class="vt-pagination">
<!-- First page (chevron-double-left) -->
<button class="vt-page-btn" title="First page" aria-label="First page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M18 17C18 17 13 13.3176 13 12C13 10.6824 18 7 18 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M11 17C11 17 6.00001 13.3176 6 12C5.99999 10.6824 11 7 11 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
<!-- Previous page (chevron-left) -->
<button class="vt-page-btn" title="Previous page" aria-label="Previous page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
<!-- Page numbers -->
<button class="vt-page-btn">1</button>
<button class="vt-page-btn">2</button>
<button class="vt-page-btn vt-active">3</button>
<button class="vt-page-btn">4</button>
<button class="vt-page-btn">5</button>
<!-- Next page (chevron-right) -->
<button class="vt-page-btn" title="Next page" aria-label="Next page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
<!-- Last page (chevron-double-right) -->
<button class="vt-page-btn" title="Last page" aria-label="Last page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M6.00004 17C6.00004 17 11 13.3176 11 12C11 10.6824 6 7 6 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M13 17C13 17 18 13.3176 18 12C18 10.6824 13 7 13 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
</nav>
Guidelines
Anatomy
nav.vt-pagination ← Pagination container
├── button.vt-page-btn ← Previous (icon + label)
├── button.vt-page-btn ← Page number
├── button.vt-page-btn.vt-active ← Current page
├── span.vt-pagination-ellipsis ← Skipped pages
└── button.vt-page-btn ← Next (label + icon)
API Reference
| Class | Type | Description |
|---|---|---|
vt-pagination |
Base | Row of page buttons with a 4px gap |
vt-page-btn |
Part | Page button — at least 40×40px, grows with a label (Previous / Next); icon and label sit 8px apart |
vt-pagination-ellipsis |
Part | Ellipsis for skipped pages, as tall as a page button |
vt-page-btnvt-active |
State | Current page — filled with the brand color |
vt-page-btnvt-disabled |
State | Unreachable end (Previous on the first page) — dimmed |
vt-page-btn-sm |
Size | Compact page button (32px) |
vt-pagination-info |
Part | "Page 1 of 10" between the arrows; <strong> marks the numbers |
aria-current="page" |
Attribute | Marks the current active page for screen readers |
Accessibility
| Feature | Details |
|---|---|
| Semantic HTML | Use <nav> with aria-label="Pagination" for the wrapper |
| Current Page | Use aria-current="page" on the active page button |
| Disabled State | Disable and use aria-disabled="true" on prev/next at boundaries |
| Button Labels | Icon-only buttons need aria-label (e.g., "Go to page 5") |
| Keyboard | All buttons must be keyboard accessible via Tab and Enter/Space |