Navigation
Pagination
Moves through a paged list. The page window collapses to an ellipsis once the total grows past what fits.
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
Copy
import { JPagination } from '@juxtui/ui'Usage #
Copy
<JPagination v-model="page" :total="10" />How many neighbours stay visible around the current page is set with sibling-count — past that, both ends collapse to an ellipsis independently.
Variants & examples #
Sibling count#
A longer trail with sibling-count="2" and the compact sm size.
Disabled#
API #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| modelValue | number | 1 | Current page, bound with v-model. |
| total | number | — | Total number of pages. Required. |
| siblingCount | number | 1 | Pages shown on each side of the current page before collapsing to an ellipsis. |
| label | string | 'Pagination' | Accessible name for the nav landmark. |
| size | 'sm' | 'md' | 'md' | Button size. |
| disabled | boolean | false | Disables every control. |
Events
| Event | Payload | Description |
|---|---|---|
| update:modelValue | number | Emitted when the current page changes. |
Accessibility #
- Wrapped in a
<nav>landmark labelled “Pagination” by default. - Previous and next controls have accessible names and disable themselves at either end.
- The current page button carries
aria-current="page"; every page button has anaria-labelnaming its number. - Ellipsis markers are decorative and hidden from screen readers.
Keyboard #
| Key | Action |
|---|---|
| Home | From a page button, jumps to the first page. |
| End | From a page button, jumps to the last page. |