Skip to main content
You are viewing Pre-Alpha documentation.
Vuetify0 Logo
Theme
Mode
Accessibility
Vuetify

Sign in

Sign in with your preferred provider to access your account.

createPagination API

API reference for the createPagination composable.

Functions

createPagination

(_options?: PaginationOptions) => PaginationContext

Creates a pagination instance.

createPaginationContext

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

Creates a pagination context for dependency injection.

usePagination

(namespace?: string) => PaginationContext

Returns the current pagination instance from context.

Options

page

number | ShallowRef<number>

Initial page or ref for v-model (1-indexed).

Default: 1

itemsPerPage

MaybeRefOrGetter<number>

Items per page.

Default: 10

size

MaybeRefOrGetter<number>

Total number of items.

Default: 0

visible

MaybeRefOrGetter<number>

Maximum visible page buttons.

Default: 5

ellipsis

string | false

Ellipsis character.

Default: '…'

Properties

page

ShallowRef<number>

Current page (1-indexed)

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

ComputedRef<number>

Start index of items on current page (0-indexed)

pageStop

ComputedRef<number>

End index of items on current page (exclusive, 0-indexed)

isFirst

ComputedRef<boolean>

Whether current page is the first page

isLast

ComputedRef<boolean>

Whether current page is the last page

Methods

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

Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/