@codesoup/scroll-to-top
v0.0.5
Published
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
Downloads
18
Readme
Scroll To Top
Component places a vertically centered scroll button on the right of the html body.
Dependencies
- @Iconify/svelte
Installation
#in your app directory
npm install @codesoup/scroll-to-top
How to use
- Import the component and supply an options object with optional properties "device" and "icon" .
- Set component visibility with device property (possible values: desktop, handheld). Leave unset and component is visible on both device types
- Overwrite default iconify icon with the icon property
<script>
import { ScrollButton } from '@codesoup/scroll-to-top';
const config = { device: , icon: };
...
<ScrollButton options={icon} >