Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Animated Pagination

Preview

Page 6 of 20

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/pagination

Import the shared styles once in your application.

TSUsage
import Pagination from '@/components/beui/controls/Pagination.vue'
import '@/components/beui/styles.css'

API Reference

totalPages
number
Default—
v-model:page?
number

The current page, 1-based. Bind it with `v-model:page` (or `v-model`) to control the pagination.

Default—
defaultPage?
number

Initial page when `v-model` is not used.

Default1
siblings?
number

Pages shown either side of the current one.

Default1
boundaries?
number

Pages always shown at each end.

Default1
jump?
number

Pages an ellipsis jumps when pressed.

Default5
getHref?
(page: number) => string

Render pages as links. Each control still emits `change`, so a client router can update state while the href keeps the page shareable.

Default—
#renderLink?
slot

Render each page link yourself, for your router's link. Receives the link `props` (href, class, aria attributes, click handler) to bind onto it, and `Children`, a component for the link's contents: render it inside with `<component :is="Children" />`. Only used together with `getHref`.

Default—
labels?
Partial<PaginationMessages>

Override any built-in string. `{count}` fills `back`/`forward`, `{page}` fills `page`.

Default—
class?
string
Default—
disabled?
boolean
Default—
label?
string

Accessible name of the navigation landmark (overrides `labels.label`).

Default—
v-model?
number
Default—
@change?
(page: number) => void
Default—

Updated