# createPagination API

> Auto-generated API reference for `createPagination` from @vuetify/v0 (Vuetify0).
> Source of truth: https://0.vuetifyjs.com/api/create-pagination

## Related

- https://0.vuetifyjs.com/composables/data/create-pagination
- https://0.vuetifyjs.com/composables/data/create-data-table
- https://0.vuetifyjs.com/composables/data/create-filter
- https://0.vuetifyjs.com/components/semantic/pagination

## Functions

### createPagination

Creates a pagination instance.

```ts
(_options?: PaginationOptions) => PaginationContext
```

### createPaginationContext

Creates a pagination context for dependency injection.

```ts
(_options?: PaginationContextOptions) => ContextTrinity<PaginationContext>
```

### usePagination

Returns the current pagination instance from context.

```ts
(namespace?: string) => PaginationContext
```

## Options

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `page` | `number \| ShallowRef<number> \| undefined` | `1` | no | Initial page or ref for v-model (1-indexed). |
| `itemsPerPage` | `MaybeRefOrGetter<number> \| undefined` | `10` | no | Items per page. |
| `size` | `MaybeRefOrGetter<number> \| undefined` | `0` | no | Total number of items. |
| `visible` | `MaybeRefOrGetter<number> \| undefined` | `7` | no | Maximum visible page buttons. |
| `ellipsis` | `string \| false \| undefined` | `'...'` | no | Ellipsis character. |

## Methods

| Name | Type | Description |
|---|---|---|
| `first` | `() => void` | Go to first page |
| `last` | `() => void` | Go to last page |
| `next` | `() => void` | Go to next page |
| `prev` | `() => void` | Go to previous page |
| `select` | `(value: number) => void` | Go to specific page |

## Properties

| Name | Type | Description |
|---|---|---|
| `page` | `WritableComputedRef<number, number>` | Current page (1-indexed, auto-clamped to total pages) |
| `itemsPerPage` | `number` | Items per page |
| `size` | `number` | Total number of items |
| `pages` | `number` | Total number of pages (computed from size / itemsPerPage) |
| `ellipsis` | `string \| false` | Ellipsis character, or false if disabled |
| `items` | `ComputedRef<PaginationTicket[]>` | Visible page numbers and ellipsis for rendering |
| `pageStart` | `Readonly<Ref<number, number>>` | Start index of items on current page (0-indexed) |
| `pageStop` | `Readonly<Ref<number, number>>` | End index of items on current page (exclusive, 0-indexed) |
| `isFirst` | `Readonly<Ref<boolean, boolean>>` | Whether current page is the first page |
| `isLast` | `Readonly<Ref<boolean, boolean>>` | Whether current page is the last page |
