@codesoup/scroll-to-top

0.0.5 • Public • Published

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} >

Readme

Keywords

Package Sidebar

Install

npm i @codesoup/scroll-to-top

Weekly Downloads

1

Version

0.0.5

License

ISC

Unpacked Size

10.2 kB

Total Files

8

Last publish

Collaborators

  • alnig441