Vue component providing pagination controls for lists.
<!--
Source: https://github.com/arabcoders/watchstate | License: MIT | Copyright 2024 ArabCoders
Provided via justclaw.it.com; keep this notice with the code.
-->
<template>
<div class="flex max-w-full min-w-0 flex-nowrap items-center gap-2">
<UButton
v-if="page !== 1"
rel="first"
aria-label="Go to first page"
color="neutral"
variant="outline"
size="sm"
icon="i-lucide-chevrons-left"
class="hidden shrink-0 sm:inline-flex"
:disabled="isLoading"
:loading="isLoading"
square
@click="changePage(1)"
/>
<UButton
v-if="page > 1 && page - 1 !== 1"
rel="prev"
aria-label="Go to previous page"
color="neutral"
variant="outline"
size="sm"
icon="i-lucide-chevron-left"
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key