Skip to content
ts
import Pagination from "@ui/Pagination.vue"

Pagination

The pagination component helps users navigate through large lists of results by splitting them up into pages.

PropData typeRequired?Description
pagesNumberYesThe total number of pages to paginate.
v-model:pageNumberYesThe page number of the current page.

NOTE

Use this component for navigation targets only. The semantics of the <nav> element apply.

Pagination model

Create a pagination bar by passing the number of pages to the pages prop. Use v-model to sync the selected page to your page data. Users can click on each button or input a specific page and hit return.

template
<Pagination :pages="8" v-model:page="page" />

Using this component

A11y Checklist

Accessible Pagination

template
<Pagination
  v-model:page="page"
  :pages
/>

Test this component in isolation against WCAG2 criteria