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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
total | number | ✅ | 0 | Total items |
active | number | ❌ | null | Active item |
Events
| Name | Type | Description |
|---|---|---|
update:active | number | active prop value is updated |
Model Value
| Name | Type | Description |
|---|---|---|
active | number | Set active item |