Skip to content
On this page

Pagination

Basic Usage

1
2
3
4
5
...
10
1
2
3
4
5
6
7
8
9
10
...
200
<template>
  <div class="">
    <HcPagination
      v-model:currentPage="currentPage1"
      :total-pages="10"
    />

    <HcPagination
      v-model:currentPage="currentPage2"
      :total-pages="200"
      :items-per-section="10"
      class="mt-8"
    />
  </div>
</template>

<script lang="ts" setup>
import { HcPagination } from '@deeepvision/hope-component-kit';
import { ref } from 'vue';

const currentPage1 = ref(1);
const currentPage2 = ref(1);
</script>

Props

PropertyType Values Description Default
totalPagesNumberNumberTotal amount of pagesundefined
currentPageNumberNumbercurrent pageundefined
itemsPerSectionNumberNumbermax amount of visible pages in each sectionundefined

Events

PropertyType Values Description Default
update:current-pageFunctionpage - numbertriggers when the Pagination page changed

Created by DeepVision Software.