smooth-scroll button pinned to the viewport corner.
Install
From your site folder, run:
jprot add BackToTopThat downloads the self-contained component into theme/components/BackToTop.js,
where it is picked up automatically — the same way as any built-in component.
To remove it later, just delete that file.
Use it as a homepage section
Add an entry to the sections: list in jprot.config.js:
sections: [
{ component: 'BackToTop', title: 'BackToTop' },
]Use it inside a page
On its own line in any Markdown file, passing the props:
:::BackToTop label="Top" mode="inline"Props
| Prop | Type | Note | |
|---|---|---|---|
label | string | accessible text | |
mode | string | "pinned" floats at the viewport corner (default) \ | "inline" renders statically, always visible |