Skip to content

pantoken-root / renderers/web-components/src / pages

Taipūtī: pages ​

const pages: ElementDefinition

Alpha

&lt;instui-pages&gt; — shows one slotted [data-page] panel at a time, swapping with the View Transitions API when available (a plain toggle otherwise). push(id)/back() keep a history stack; the active attribute reflects the current page and can be set to navigate, and a bubbling change event (detail.page) fires per swap. Drivable from light DOM via Invoker Commands: <button command="--push" commandfor="pages-id" data-page="…"> and <button command="--back" commandfor="pages-id">.

Tauira ​

html
<instui-pages active="one">
  <section data-page="one">Tuatahi <button command="--push" commandfor="p" data-page="two">Panuku</button></section>
  <section data-page="two">Tuarua <button command="--back" commandfor="p">Hoki</button></section>
</instui-pages>