Skip to content

Pagination

Page navigation with optional rows-per-page selector for data tables and lists.

Open in Storybook

Interactive Demo

Current page: 1

Usage

vue
<script setup>
import { ref } from 'vue';
import { Pagination } from '@yellowcard/b2b-design-system';

const page = ref(1);
</script>

<template>
  <Pagination v-model="page" :totalPages="10" :totalResults="100" />
</template>

API Reference

Props

PropTypeDefaultDescription
modelValuenumberCurrent page (v-model)
totalPages*numberTotal number of pages
totalResultsnumberTotal result count
rowsPerPagenumberItems per page
showRowsPerPagebooleanfalseShow rows-per-page selector
rowsPerPageOptionsnumber[]Available row count options
maxVisiblePagesnumberMax page buttons shown
previousLabelstringPrevious button label
nextLabelstringNext button label

Events

EventPayloadDescription
update:modelValuenumberPage changed