Skip to content
Elements / Navigation

pagination

binds state

Previous, next and page-number buttons for moving through pages of results. Show the current page's items with slice(rows, (page - 1) * 10, page * 10).

Spec · edit me

No problems. The parser accepted every line.

Result · try itOpen in playground
Tweak the props
pages
12

Props

bindstateThe number state holding the current page, starting at 1.required
pagesnumberHow many pages there are, e.g. pages={ceil(len(rows) / 10)}.required
onactionActions to run after the page changes, e.g. emit:changed. Separate several with ;—
ifconditionShow only when this expression is true, e.g. if=done or if={count>0}. Every element takes it.—
tipstringA short explanation shown on hover, keyboard focus or a tap, e.g. tip="Orders not yet shipped": for a term or a number some people won't know, instead of more words on screen. It makes the element a Tab stop if it isn't one. Every element takes it.—

SayShape v0.1 is an early prototype under the MIT License. Status · GitHub