Pagination

Canonical page links or Live page actions with explicit boundary states.

Canonical links reload the requested demo page without a Live action.

Open in new tab

Each preview is its own Live page in a frame, because this site is a Vue 3.5 app built on the Pulsar starter kit. An open list or popover stays inside its frame; in your application it opens over the page.

Installation

bash
suprnova live:add pagination

Usage

html
{% import "suprnova-ui/pagination/pagination.html" as pagination %}
{% call pagination::pagination("pages") %}{% call pagination::page_link("/entries?page=1", 1, current=true) %}{% endcall %}{% endcall %}

Examples

Live pages

The server pages through demo records and replaces the same-route page query.

Open in new tab

Keyboard and accessibility

suprnova.pagination - two explicit modes (NAV-003). Route mode: every page is an anchor with its canonical URL, so reload, sharing and history are the browser's. Live mode: previous and next are buttons on registered actions whose result reflects the new query into the current history entry through the runtime (history.replaceState, no entry per page); the current position is text.

API reference

pagination

ParameterDefaultDescription
idRequiredUnique pagination navigation ID.
label"Pages"Accessible name of the page navigation.

page_link

ParameterDefaultDescription
hrefRequiredCanonical URL of this page.
numberRequiredVisible page number.
currentfalseServer-authoritative current page, marked with aria-current.

page_edge_link

ParameterDefaultDescription
hrefRequiredCanonical URL of the adjacent page.
textRequiredVisible previous or next label.
disabledfalseUnavailable boundary, rendered as text rather than an anchor.

page_action

ParameterDefaultDescription
actionRequiredRegistered Live action that changes the page and reflects its query.
textRequiredVisible page action text.
disabledfalseUnavailable boundary; disables the button.

page_position

ParameterDefaultDescription
pageRequiredCurrent one-based page number.
pagesRequiredServer-known total number of pages.