Skip to content

Pagination ​

Page list

Moving between pages of results. For a feed people read to the end, InfiniteScroll or a Load more button fits better; pages suit results people come back to or share.

Basic
page: 7
  • With href, pages are links (through your router when provided), so each page has a URL; without it they are buttons and v-model holds the page.
  • siblings sets how many pages show either side of the current one; the rest collapse to ….
  • The current page has aria-current="page"; prevLabel / nextLabel name the arrows.

Usage ​

ts
import { BlessPagination } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
total*number—
siblingsnumber1pages shown either side of current
labelstring"Pagination"
prevLabelstring"Previous"
nextLabelstring"Next"
href((page: number) => string)—render <a href> using this fn instead of buttons
modelValuenumber1

Events

NamePayloadDescription
update:modelValue[value: number]

Released under the MIT License. Character names and artwork belong to their owners.