Skip to content

Pagination

Features:

  • Item links
  • Active item
  • Prev and next button

Usage

Set the total items using the total props.

vue
<script setup>
import { Pagination } from 'gurunkit';
</script>

<template>
  <Pagination :total="5" />
</template>

Active

Set the active item using the active props.

vue
<script setup>
import { Pagination } from 'gurunkit';
</script>

<template>
  <Pagination :total="5" :active="2" />
</template>

Active V-Model

Use v-model:active to bind the active item.

vue
<script setup>
import { Pagination } from 'gurunkit';
import { ref } from 'vue';

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

<template>
  <Pagination :total="5" v-model:active="active" />
</template>

API

Props

NameTypeRequiredDefaultDescription
totalnumber0Total items
activenumbernullActive item

Events

NameTypeDescription
update:activenumberactive prop value is updated

Model Value

NameTypeDescription
activenumberSet active item

Released under the MIT License.