All skills
Skillintermediate
Component specification
Displays data in paged format and provides navigation between pages. Enables users to navigate through large datasets by breaking content into manageable pages with controls for moving between them.
Claude Code Knowledge Pack7/10/2026
Overview
Component specification
Displays data in paged format and provides navigation between pages. Enables users to navigate through large datasets by breaking content into manageable pages with controls for moving between them.
- Component Name: N8nPagination
- Element+ Component: ElPagination
- Reka UI Component: Pagination
- Nuxt UI Component: Pagination
Public API Definition
Props
currentPage?: number- Current active page number (1-indexed). Supports v-model binding viav-model:current-page. Default:1pageSize?: number- Number of items to display per page. Default:10total?: number- Total number of items across all pages. Used to calculate total page count. Default:0pagerCount?: number- Maximum number of page buttons to display in the pager. Must be an odd number. Default:7layout?: string- Order and elements to display in the pagination. Comma-separated values:'prev' | 'pager' | 'next'. Default:'prev, pager, next'
Events
@update:current-page- Emitted when the current page changes. Payload:(value: number) => void
Template usage example
Simple pagination (most common):
<script setup lang="ts">
const currentPage = ref(1)
</script>
<template>
</template>
With custom pager count:
<script setup lang="ts">
const currentPage = ref(1)
const rowsPerPage = 20
const totalRows = 150
</script>
<template>
</template>
Server-side pagination (0-indexed backend):
<script setup lang="ts">
// Backend uses 0-indexed pages
const backendPage = ref(0)
const itemsPerPage = 25
const totalItems = ref(0)
// Fetch data when page changes
watch(backendPage, async (newPage) => {
const response = await fetch(`/api/items?page=${newPage}&limit=${itemsPerPage}`)
const data = await response.json()
totalItems.value = data.total
})
// Convert between 1-indexed UI and 0-indexed backend
const handlePageChange = (page: number) => {
backendPage.value = page - 1
}
</script>
<template>
</template>
Client-side pagination in data table:
<script setup lang="ts">
const allItems = ref([/* ... large dataset ... */])
const currentPage = ref(1)
const pageSize = 20
const totalPages = computed(() => Math.ceil(allItems.value.length / pageSize))
const paginatedItems = computed(() => {
const start = (currentPage.value - 1) * pageSize
const end = start + pageSize
return allItems.value.slice(start, end)
})
</script>
<template>
<div>
<div v-for="item in paginatedItems" :key="item.id">
{{ item.name }}
</div>
1"
:pager-count="5"
:page-size="pageSize"
:total="allItems.length"
:current-page="currentPage"
@update:current-page="currentPage = $event"
/>
</div>
</template>