Standard Pagination
Numbered page controls with previous and next arrows for stepping through content
<nav class="nds-pagination" aria-label="Pagination">
<ul class="nds-pagination-list">
<li class="nds-pagination-item nds-pagination-prev">
<button type="button" class="nds-btn nds-subtle nds-icon-only" aria-label="Previous page" disabled>
<i class="nds-icon nds-hgi-arrow-right-01" aria-hidden="true"></i>
</button>
</li>
<li class="nds-pagination-item">
<button type="button" class="nds-btn nds-subtle nds-indicator" data-state="active" aria-current="page" aria-label="Page 1">
<span class="nds-label">1</span>
</button>
</li>
<li class="nds-pagination-item">
<button type="button" class="nds-btn nds-subtle nds-indicator" aria-label="Page 2">
<span class="nds-label">2</span>
</button>
</li>
<li class="nds-pagination-item">
<button type="button" class="nds-btn nds-subtle nds-indicator" aria-label="Page 3">
<span class="nds-label">3</span>
</button>
</li>
<li class="nds-pagination-item">
<button type="button" class="nds-btn nds-subtle nds-indicator" aria-label="Page 4">
<span class="nds-label">4</span>
</button>
</li>
<li class="nds-pagination-item">
<button type="button" class="nds-btn nds-subtle nds-indicator" aria-label="Page 5">
<span class="nds-label">5</span>
</button>
</li>
<li class="nds-pagination-item nds-pagination-next">
<button type="button" class="nds-btn nds-subtle nds-icon-only" aria-label="Next page">
<i class="nds-icon nds-hgi-arrow-left-01" aria-hidden="true"></i>
</button>
</li>
</ul>
</nav>
Data-Driven Pagination
Set a page count and optional active page on an empty nav element, and the component generates all controls automatically
<nav class="nds-pagination" data-total-pages="8" data-active-page="1" aria-label="Pagination"></nav>
Automatic Ellipsis Collapse
When page count exceeds five, middle pages collapse into a dropdown for compact navigation
Paginated Grid
Automatically split grid items across pages by marking children with nds-page-item and placing a data-auto-pagination nav after the container
Paginated Table
Table rows paginate the same way as grid items, with the nds-page-item class on each body row
|
#
|
Service
|
Description |
System
|
Most Used |
|---|---|---|---|---|
| 1 | Identity Verification | Verify your national identity and obtain digital certificates for government transactions | Identity & Records | Yes |
| 2 | Passport Renewal | Renew your passport online with expedited processing and home delivery options | Identity & Records | Yes |
| 3 | Birth Certificate Request | Request official birth certificates and family documentation online | Identity & Records | — |
| 4 | Marriage Contract Registration | Register marriage contracts and obtain official marriage certificates | Identity & Records | — |
| 5 | Driver's License Services | Apply for, renew, or update your driving license information | Transport & Vehicles | Yes |
| 6 | Vehicle Registration | Register new vehicles, transfer ownership, or renew your vehicle registration | Transport & Vehicles | Yes |
| 7 | Visa Application | Apply for entry visas for visitors, workers, or family members | Transport & Vehicles | — |
| 8 | Health Insurance Enrollment | Enroll in government health insurance plans and manage your coverage | Healthcare & Social | Yes |
| 9 | Medical Appointment Booking | Schedule appointments at government hospitals and healthcare facilities | Healthcare & Social | Yes |
| 10 | Employment Certificate | Request official employment certificates and salary statements | Healthcare & Social | Yes |
| 11 | Work Permit Processing | Apply for work permits and employment authorization for foreign workers | Healthcare & Social | — |
| 12 | Retirement Benefits Application | Apply for retirement pensions and manage your social security benefits | Healthcare & Social | — |
| 13 | Tax Declaration Filing | Submit your annual tax returns and manage tax obligations online | Business & Finance | Yes |
| 14 | VAT Registration | Register for VAT and manage value-added tax compliance for your business | Business & Finance | — |
| 15 | Business License Application | Apply for commercial licenses and business permits for new ventures | Business & Finance | — |
| 16 | Property Registration | Register property ownership, transfers, and real estate transactions | Business & Finance | — |
| 17 | Building Permit Request | Apply for construction permits and building approvals for new projects | Business & Finance | — |
| 18 | School Enrollment | Enroll children in public schools and manage educational records | Education & Justice | Yes |
| 19 | Certificate Authentication | Authenticate academic certificates and professional credentials | Education & Justice | — |
| 20 | Court Case Filing | File legal cases and track court proceedings through the judicial system | Education & Justice | — |
Built-in Features
Scans for nds-pagination elements on the page. Active states, disabled buttons, and ellipsis collapse configure themselves from the markup.
Paginations with more than five pages automatically collapse middle pages into a dropdown menu, keeping the first three and last page visible.
Add data-auto-pagination to any nds-pagination after a nds-paged-content container and the pagination controls, page visibility, and scroll behavior are handled automatically.
When used with filtered content, call NDS.Pagination.refresh() to recalculate page counts and reset to page one with only visible items.
Buttons shrink on mobile viewports and content pagination watches for --per-page changes on resize, rebuilding pages to match the new layout.
Navigate to any page, refresh after content changes, or create new pagination instances through the NDS.Pagination API.
Usage Guidelines
Best Practices
- Use content pagination (
data-auto-pagination) for items already in the DOM: card grids, table rows, or list items - Use manual pagination when each page number links to a different URL or triggers a server-side request
- Use data-driven generation (
data-total-pages) when you know the page count but want the component to build the controls - Do not paginate fewer than two pages. Auto-pagination hides controls automatically when all items fit
- Set
--per-pageto match your grid column count so each page fills the layout. Update it in media queries for responsive grids - For tables, wrap the table in
nds-paged-contentand addnds-page-itemon each<tr>in<tbody>. The table wrapper is added automatically - Both
<button>and<a>elements work inside pagination items. Use buttons for client-side navigation, anchors for distinct URLs
Modifier Classes
| Class | Applied to | Description |
|---|---|---|
nds-md |
.nds-pagination |
Medium size, 32px buttons |
nds-sm |
.nds-pagination |
Small size, 24px buttons |
nds-paged-content |
Content wrapper | Marks a container whose nds-page-item children should be paginated |
nds-page-item |
Content children | Marks individual items (cards, rows, list items) as pageable content |
Data Attributes
| Attribute | Description |
|---|---|
data-auto-pagination |
Add to nds-pagination to enable content-based auto-pagination from the preceding nds-paged-content container |
data-total-pages="N" |
Set on an empty nds-pagination to auto-generate N page buttons. Optionally add data-active-page="N" to set the initial page (defaults to 1) |
data-state="active" |
Set on a page button to mark it as the current page. Updated automatically on navigation |
CSS Custom Properties
| Property | Default | Description |
|---|---|---|
--pagination-margin-top |
var(--spacing-2xl) |
Space above the pagination nav |
--per-page |
5 |
Items per page in auto-pagination. Set on the nds-paged-content container |