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
modelValuenumber—Current page (v-model)
totalPages*number—Total number of pages
totalResultsnumber—Total result count
rowsPerPagenumber—Items per page
showRowsPerPagebooleanfalseShow rows-per-page selector
rowsPerPageOptionsnumber[]—Available row count options
maxVisiblePagesnumber—Max page buttons shown
previousLabelstring—Previous button label
nextLabelstring—Next button label

Events ​

EventPayloadDescription
update:modelValuenumberPage changed