ng-back-to-top

Angular 2+ Back To Top Button Component

Usage no npm install needed!

<script type="module">
  import ngBackToTop from 'https://cdn.skypack.dev/ng-back-to-top';
</script>

README

ng-back-to-top

Angular 2+ Back To Top Button Component

Donate

( This Library Is Using Angular CLI's Library Generation Command )

How to:

Install npm

   npm install ng-back-to-top --save

Simple Example

Import Module

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { NgBackToTopModule } from 'ng-back-to-top';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgBackToTopModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Use Component

<div>
  <ng-back-to-top></ng-back-to-top>
</div>

API

input property

color property is available to change the color of default button arrow

bgColor this property can change the background color of back to top button

Use Component With Custom Design / Content

<div>
  <ng-back-to-top>
    <div style="font-weight: bold; padding: 10px;">
      Go To Top
    </div>
  </ng-back-to-top>
</div>

Any contributions are appreciated.

paypal