Skip to content

BasePagination

Pagination component

Props

Prop nameDescriptionTypeValuesDefault
totalspecify the total number of pagesnumber-null
modelValuecurrently active page numbernumber-1
useLinkElementspecify if pagination elements should be links - specify a vue link element (as
string e.g. 'RouterLink or pass the component directly) or set the variable false
if element should not be a link (this needs vue-router)
currently only vue components (like 'RouterLink' or 'NuxtLink') are supported!

caveat: if you are using Nuxt the string 'NuxtLink' is not enough,
but you need to import the component as import { NuxtLink } from '#components';
and pass the component to the prop!
string|boolean|object-false
assistiveTextthis prop gives the option to add assistive text for screen readers
properties:

currentPage: aria-label for the current page
nextPage: aria-label for the next page
pagination: aria-label for the pagination element description
previousPage: aria-label for the previous page
toPage: aria-label for all page buttons except the current one

The values of this object might be plain text or a key for an i18n file
object-{
currentPage: 'Current Page, Page',
nextPage: 'Go to next page',
pagination: 'Pagination',
previousPage: 'Go to previous page',
toPage: 'Go to page'
}

Events

Event namePropertiesDescription
update:model-valueundefined number - the new page numbertriggered on page select

Demo

Adjust the number of pages and resize to see differences in the display.