Figma component
Overview
Pagination nav lets users move between pages of content, such as search results or a list of cards. It shows page numbers between Previous and Next controls, and collapses long ranges with an ellipsis.
Key features
- Page numbers with the current page highlighted.
- Previous / Next controls, as labelled buttons or icon buttons.
- Ellipsis for long ranges, with configurable start, middle and end zones.
- Themes: Spark and Ocean, light and dark.
Anatomy
- Previous button: goes to the previous page; disabled on the first page.
- Page button: goes to that page.
- Current page: highlighted.
- Ellipsis: hidden pages.
- Next button: goes to the next page; disabled on the last page.
Properties
|
Figma |
Code |
Notes |
|---|---|---|
|
Is icon only |
is-only-icon |
Previous/Next become icon buttons. Page numbers keep text. Default: false. |
|
Label (Previous / Next button) |
previous-button-label, next-button-label |
Defaults: Previous, Next. |
|
State Active (on a page button) |
current-page |
Current page, 1-based. Default: 1. |
|
— |
total-count |
Total number of items. Default: 100. |
|
— |
page-size |
Items per page. Default: 10. |
|
— |
num-start-zone-buttons, num-end-zone-buttons |
Page buttons at the start and end of the range. Default: 2. |
|
— |
show-middle-zone, num-middle-buttons |
Shows pages around the current page between two ellipses. Defaults: false, 1. |
|
— |
currentPageChanged |
Event emitted when the current page changes. |
Look and feel
Icon only
Use icon-only Previous/Next in compact layouts. Page numbers always keep text.
Themes
Spark and Ocean, in light and dark mode.
Behavior
- The number of pages is computed from total-count and page-size.
- By default, the first and last pages are shown with one ellipsis in between. With show-middle-zone, pages around the current page are shown between two ellipses.
- With a total of 0 or an invalid page size, no page buttons are rendered and Previous/Next are disabled.
- For markup rendered by another framework or the server, reuse the public CSS classes: nv-pagination-nav, nv-pagination-nav__list, nv-pagination-nav__item, nv-pagination-nav__item--ellipsis and nv-pagination-nav-link.
Accessibility
- Wrap the component in a nav landmark with an accessible name, for example "Results pages".
- Mark the current page with aria-current="page".
- Icon-only Previous/Next keep an accessible name.
- Previous and Next are disabled, not hidden, at the limits.
Usage
Use labelled Previous/Next when there is room for them.
Don't use icon-only controls in wide layouts: labels are easier to understand.
Related
- Pagination table: for tables, use Pagination table. It adds row counts and a page size selector.
Links
The Figma file contains the latest UI designs, while the links to Web Component, Blazor, Angular, React, and VueJS provide a live demo of the component.
Feedback
Have feedback, an idea, or a bug to report? Head over to our Contributions page.