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 andv-modelholds the page. siblingssets how many pages show either side of the current one; the rest collapse to….- The current page has
aria-current="page";prevLabel/nextLabelname the arrows.
Usage
ts
import { BlessPagination } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
total* | number | — | |
siblings | number | 1 | pages shown either side of current |
label | string | "Pagination" | |
prevLabel | string | "Previous" | |
nextLabel | string | "Next" | |
href | ((page: number) => string) | — | render <a href> using this fn instead of buttons |
modelValue | number | 1 |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: number] |