On this page
@addTagHelper *, Webority.Ui.RazorThe pager
Give the pager the current page and the total, and it changes page when you pick a number.
Under a table
Place the pager under a table and show only the current page's rows above it.
| Building | Status |
|---|---|
| Building 1 | Draft |
| Building 2 | Compliant |
| Building 3 | Compliant |
| Building 4 | Draft |
| Building 5 | Compliant |
Standalone for cards and lists
Use the standalone pager under a card or list, where no table footer rule is needed.
Numbered and prev-next
Use arrows for a long set that people step through one page at a time, and numbered pages for a short set.
Sizes
Use a small size for a compact layout in sidebars, card headers, or dense toolbars.
Every option
Every value of every prop, one cell each.
page
page="1" (first page, previous disabled)page="5" (last page, next disabled)total
total="42" (5 pages of 10)totalPages
total-pages="3" (wins over total="42")total-pages="1" (renders nothing)pageSize
page-size="10" (page-size menu shows)page-size="25"onPageChange
onPageChange (React only): page buttons follow href-templateonPageSizeChange
onPageSizeChange (React only): the size menu follows href-template with {pageSize}href-template
href-template="?page={page}": the link each page button followspageSizes
page-sizes="20,40"page-sizes left out: 5, 10, 25 and 50 (default)mode
mode="numbered" (default)mode="prev-next"showPageSize
show-page-size="true" (default)show-page-size="false"summary
summary="false" (default)summary: Showing 11 to 20 of 42siblings
siblings="0"siblings="1"siblings="2" (default)siblings="3"size
size="md" (default)size="sm"variant
variant="footer" (default)variant="standalone"ariaLabel
aria-label="Results pages": names the nav for screen readers, not drawnrowsPerPageLabel
rows-per-page-label="Items per screen": names the page-size menu for screen readerspageSizeLabel
page-size-label="{count} rows": each menu option reads 10 rowspreviousLabel
previous-label="Back": the previous arrow's accessible namenextLabel
next-label="Forward": the next arrow's accessible namepageLabel
page-label="Go to {page}": each page button's accessible namerangeText
range-text="{page} of {pages}": the readout in prev-next modeclassName
class="analytics-pager": an extra class on the navGuidance
What to do, and what to avoid.
Use it when
- A list is long enough that showing everything at once is unwieldy.
- The user needs to control how many rows they see at a time.
- You are paging content that is not an AppDataTable and need the footer standalone.
Reach for something else when
- The list is short and fits comfortably on one screen. → no pager
- You are already using AppDataTable. → the pagination prop on AppDataTable
- The user should keep scrolling instead of paging. → infinite scroll
Show the page and the total
The page buttons show the current page and how many there are, so the user always knows where they are in the list.
Bare prev/next buttons with no page readout hide how big the list is or where the user stands.
Sit the pager under its table
| Building | Status |
|---|---|
| Building 1 | Draft |
| Building 2 | Compliant |
| Building 3 | Compliant |
| Building 4 | Draft |
| Building 5 | Compliant |
The pager sits flush under the table it controls, so the two read as one visual unit.
| Building | Status |
|---|---|
| Building 1 | Draft |
| Building 2 | Compliant |
| Building 3 | Compliant |
A pager floating above its table breaks the expected footer placement and reads as disconnected.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
19 props. The 5 most used come first.
Used on most screens 5 props
| Prop | Type | Default | Description |
|---|---|---|---|
| pagedefault 1 | int | 1 | The current page, counted from 1. |
| totaldefault - | int | - | The number of rows across all pages. Used when total-pages is not given: the page count is the total divided by page-size, rounded up. |
| page-sizedefault - | int | - | The rows per page. The page-size menu shows it as selected; without it, or with show-page-size set to false, no menu shows. |
| total-pagesdefault - | int | - | The number of pages. It wins over total when both are given. |
| page-sizesdefault 5,10,25,50 | string | 5,10,25,50 | Comma-separated options for the page-size menu, each shown as "N per page". The current page size is always offered. |
Less common 14 props
| Prop | Type | Default | Description |
|---|---|---|---|
| href-templatedefault required | string | required | The link address. {page} is required; {pageSize} is required when the menu shows. |
| show-page-sizedefault true | bool | true | Shows the page-size menu. Set it to false for a pager that pages but does not expose the page size. |
| summarydefault false | bool | false | Shows Showing x to y of z at the start of the pager. It needs total and page-size; without both nothing is shown. |
| modedefault numbered | numbered | prev-next | numbered | numbered shows windowed page buttons (first, last and an ellipsis over any run of hidden pages) between the arrows. prev-next shows the arrows with a Page N of M readout. |
| siblingsdefault 2 | int | 2 | The pages shown either side of the current page in numbered mode. |
| sizedefault md | sm | md | md | sm draws 28px page and arrow buttons with 12px text. |
| variantdefault footer | footer | standalone | footer | footer sits under a table, right aligned, with a top rule. standalone is centred with no rule, for cards and lists. |
| aria-labeldefault Pagination | string | Pagination | The accessible name of the pager. |
| rows-per-page-labeldefault Rows per page | string | Rows per page | Replaces the built-in English text, for other languages. |
| page-size-labeldefault {count} per page | string | {count} per page | Replaces the built-in English text, for other languages. The token {count} is the page size. |
| range-textdefault Page {page} of {pages} | string | Page {page} of {pages} | Replaces the built-in English text, for other languages. The tokens {page} and {pages} are the current page and the page count. |
| page-labeldefault Page {page} | string | Page {page} | Replaces the built-in English text, for other languages. The token {page} is the page number. |
| previous-labeldefault Previous page | string | Previous page | Replaces the built-in English text, for other languages. |
| next-labeldefault Next page | string | Next page | Replaces the built-in English text, for other languages. |
Screen reader
4 notes- The previous and next arrows are native buttons named Previous page and Next page, disabled on the first and last page.
- Each page button is named Page N, and the current one carries aria-current="page".
- The ellipsis between page buttons is hidden from assistive technology.
- The page-size menu is named Rows per page.
Do and avoid
2 pairsShow the page and the total
The page buttons show the current page and how many there are, so the user always knows where they are in the list.
Bare prev/next buttons with no page readout hide how big the list is or where the user stands.
Sit the pager under its table
| Building | Status |
|---|---|
| Building 1 | Draft |
| Building 2 | Compliant |
| Building 3 | Compliant |
| Building 4 | Draft |
| Building 5 | Compliant |
The pager sits flush under the table it controls, so the two read as one visual unit.
| Building | Status |
|---|---|
| Building 1 | Draft |
| Building 2 | Compliant |
| Building 3 | Compliant |
A pager floating above its table breaks the expected footer placement and reads as disconnected.