Getting started
UI
W.Feature
Widget
Scroll down this page to see how it works.
---
import { BackToTopButton } from '@yatoday/astro-ui/astro';
---
<!-- Default -->
<BackToTopButton />
<!-- Or with cutom selector -->
<div id="top"></div>
<BackToTopButton
scrollOffset={20}
selector="#top"
/>
Prop | Type | Default | Description |
---|---|---|---|
selector | string | #header | HTML selector to scroll to |
scrollOffset | number | 450 | - |