Recommended
01
Compact arrows
The default: previous and next with a page counter, and a summary of the range in view.
Live preview
<Pagination
page="2"
total="137"
/>
Theme-aware, responsive pagination component.
Change any prop and inspect the server-rendered component immediately.
<Pagination />
payload.Compare configurations and resize the browser to check responsive behavior.
The default: previous and next with a page counter, and a summary of the range in view.
<Pagination
page="2"
total="137"
/>
Page numbers windowed around the current page with ellipsis gaps, so a large set never renders hundreds of buttons.
<Pagination
page="5"
total="200"
variant="numbered"
/>
siblingCount widens how many pages sit either side of the current one.
<Pagination
page="8"
pageSize="25"
total="900"
variant="numbered"
siblingCount="2"
/>
Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.
@changeFires when the component's committed value or selection changes.@previousFires when the component emits the previous event.@nextFires when the component emits the next event.<Pagination
@change='console.log(payload)'
@previous='console.log(payload)'
@next='console.log(payload)'
/>import { registerOutputHandler } from "@wrnexus/csr/outputs"
const component = document.querySelector("[data-ui-component=\"Pagination\"], [data-component=\"Pagination\"]")
if (component) registerOutputHandler(component, "change", (payload) => {
console.log("change", payload)
})
if (component) registerOutputHandler(component, "previous", (payload) => {
console.log("previous", payload)
})
if (component) registerOutputHandler(component, "next", (payload) => {
console.log("next", payload)
})All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
color | string | "primary" | No |
size | string | "default" | No |
page | number | 1 | No |
pageSize | number | 10 | No |
total | number | 0 | No |
variant | string | "compact" | No |
siblingCount | number | 1 | No |
showSummary | boolean | true | No |
label | string | "Pagination" | No |
previousLabel | string | "Previous" | No |
nextLabel | string | "Next" | No |
hrefTemplate | string | "" | No |
class | string | "" | No |