1.0.6 • Published 5 years ago

ng-scrolltop v1.0.6

Weekly downloads
42
License
MIT
Repository
github
Last release
5 years ago

ng-scrolltop

npm npm License

scrolltop component monitors current Y position in a long page or element then if scrolled down enough, shows up a clickable, unobtrusive icon that scrolls to top smoothly:

<div class="longList">
  ...
</div>

<scrolltop></scrolltop>

Optional inputs

scrolltop icon will show in left bottom of the screen and have some default attributes' values that can be adjusted by providing optional inputs like:

<scrolltop 
  [bottom]="'55px'" 
  [background]="'green'" 
  [size]="'60px'" 
  [sizeInner]="'36'" 
  [fill]="'white'">
</scrolltop>

By default, the library will work with window object but if your page has a scrolling element, you can pass over the id of that element like [elementId]="'my-scrolling-div'" to let the library work with the element not window.

A Stackblitz demo is available to show the usage.

Installation

// to install
npm install ng-scrolltop --save
yarn add ng-scrolltop

// in app.module.ts
import { NgScrolltopModule } from 'ng-scrolltop';
@NgModule({
  imports: [
    NgScrolltopModule,

// in template
<scrolltop></scrolltop>
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago