Skip to content

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

Μεταβλητή: pages ​

const pages: ElementDefinition

Άλφα

&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">.

Παράδειγμα ​

html
<instui-pages active="one">
  <section data-page="one">Πρώτο <button command="--push" commandfor="p" data-page="two">Επόμενο</button></section>
  <section data-page="two">Δεύτερο <button command="--back" commandfor="p">Πίσω</button></section>
</instui-pages>