> ## Documentation Index
> Fetch the complete documentation index at: https://api.fanvue.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> Page navigation control with previous/next buttons and numbered page indicators.

```tsx theme={null}
import { Pagination } from "@fanvue/ui";
import type { PaginationProps, PaginationVariant } from "@fanvue/ui";
```

## Examples

## Default

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-pagination--default&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="220" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="Pagination — Default" />
</Frame>

```tsx theme={null}
import { Pagination } from "@fanvue/ui";

<Pagination totalPages={5} currentPage={2} />
```

## Interactive

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-pagination--interactive&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="220" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="Pagination — Interactive" />
</Frame>

```tsx theme={null}
import { useState } from "react";
import { Pagination } from "@fanvue/ui";

function Example() {
  const [page, setPage] = useState(1);
  return <Pagination totalPages={20} currentPage={page} onPageChange={setPage} />;
}
```

## First Page

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-pagination--first-page&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="220" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="Pagination — First Page" />
</Frame>

```tsx theme={null}
import { Pagination } from "@fanvue/ui";

<Pagination totalPages={5} currentPage={1} />
```

## Interactive Dots

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-pagination--interactive-dots&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="220" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="Pagination — Interactive Dots" />
</Frame>

```tsx theme={null}
import { useState } from "react";
import { Pagination } from "@fanvue/ui";

function Example() {
  const [page, setPage] = useState(1);
  return <Pagination
           variant="dots"
           totalPages={10}
           currentPage={page}
           onPageChange={setPage}
         />;
}
```

## Last Page

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-pagination--last-page&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="220" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="Pagination — Last Page" />
</Frame>

```tsx theme={null}
import { Pagination } from "@fanvue/ui";

<Pagination totalPages={5} currentPage={5} />
```

## Props

## Pagination

Page navigation control with previous/next buttons and numbered page indicators. Supports a numbered-buttons layout (`"default"`) and a compact dots layout (`"dots"`).

<ParamField path="currentPage" type="number" required>
  Current active page (1-indexed).
</ParamField>

<ParamField path="totalPages" type="number" required>
  Total number of pages.
</ParamField>

<ParamField path="ariaLabel" type="string" default="Pagination">
  Accessible label for the `<nav>` landmark.
</ParamField>

<ParamField path="getPageLabel" type="((page: number) => string)" default={"(page: number) => `Page ${page}`"}>
  Function that returns an accessible label for each page button.
</ParamField>

<ParamField path="nextLabel" type="string" default="Next page">
  Accessible label for the next-page button.
</ParamField>

<ParamField path="onPageChange" type="((page: number) => void)">
  Callback fired when the active page changes. Receives the new 1-indexed page number.
</ParamField>

<ParamField path="previousLabel" type="string" default="Previous page">
  Accessible label for the previous-page button.
</ParamField>

<ParamField path="variant" type="&#x22;default&#x22; | &#x22;dots&#x22;" default="default">
  Display style — numbered page buttons or minimal dots.
</ParamField>

## Exported types

Also exported from `@fanvue/ui`: `PaginationProps`, `PaginationVariant`.

***

**Setup:** [Installation](/docs/ui/installation) · [Theming](/docs/ui/theming)
