Skip to content

GhostPagination reference ​

Package: @ghostvue/vue. Status: experimental (stability policy).

Headless pagination navigation with first, previous, next, last, and numbered page controls. useGhostPagination owns page state; getPaginationRange builds ellipsis markers.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
ariaLabelstring"Pagination"No`aria-label` on the `nav` root.
boundaryCountnumber1NoPages pinned at each end.
defaultPagenumber1NoInitial page when uncontrolled.
disabledbooleanfalseNoDisable every control.
ellipsisLabelstring"More pages"NoDeclared prop `ellipsisLabel`.
firstLabelstring"First page"NoDeclared prop `firstLabel`.
getPageLabel((page: number) => string)—NoDeclared prop `getPageLabel`.
lastLabelstring"Last page"NoDeclared prop `lastLabel`.
modelValuenumber—NoControlled current page (1-based).
nextLabelstring"Next page"NoDeclared prop `nextLabel`.
pageCountnumber—YesTotal pages (`≥ 1`).
previousLabelstring"Previous page"NoDeclared prop `previousLabel`.
showEdgesbooleantrueNoRender first and last controls.
siblingCountnumber1NoPages beside the current page.

Emits ​

None declared.

Models ​

PropEventTypeDescription
modelValueupdate:modelValuenumberv-model binding for `modelValue`.

Slots ​

NameDescription
ellipsisNamed slot `ellipsis`.
pageNamed slot `page`.

Slot props: ellipsis ​

NameTypeDescription
placement'end' | 'start'Slot prop `placement`.

Slot props: page ​

NameTypeDescription
currentbooleanSlot prop `current`.
pagenumberSlot prop `page`.

Exposed members ​

NameTypeDescription
blur() => voidExposed method `blur`.
elementHTMLElement | nullRoot element after mount; null before mount.
focus(options?: FocusOptions) => voidExposed method `focus`.

Parts and data attributes ​

AttributeValueDescription
data-partrootNavigation landmark.
data-partlistHorizontal list of page controls.
data-partitemList item wrapping a control or ellipsis.
data-partfirstFirst page control.
data-partpreviousPrevious page control.
data-partnextNext page control.
data-partlastLast page control.
data-partpageNumbered page control.
data-partellipsisNon-interactive ellipsis affordance.
data-statedisabledRoot while every control is disabled.
data-disabledpresentPresent on a first, previous, next, last, or page control while it cannot be activated, either because the whole pagination is disabled or because the control points at the current boundary.

CSS variables ​

None declared.

Accessibility ​

Role: navigation. APG pattern: https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/.

Required ARIA attributes: aria-label.

Keyboard ​

KeyActionAutomated browser test
TabMove focus among pagination controls.Not reviewed
EnterActivate the focused control.Not reviewed
SpaceActivate the focused control.Not reviewed

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

pagination/basic ​

Example source

Basic Headless

Numbered page navigation with previous and next.

Active page: 2

pagination/themed ​

Example source

Page through records

Themed invoice table whose pager changes both the current page and the visible range of records.

InvoiceStatus Amount
INV-1211Fabrikam IncDue$911.90
INV-1212Tailspin ToysOverdue$991.09
INV-1213Litware LabsPaid$1,070.28
INV-1214Adventure WorksPaid$1,149.47
INV-1215ProsewareDue$1,228.66