npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@proangular/ngx-scroll-top

v1.1.8

Published

Configurable, lightweight back to top button for Angular projects.

Downloads

48

Readme

npm GitHub TypeScript npm Version Node Version Package Downloads Size Demo Status Website Status Gitter Chat Discord Chat Sponsors License GitHub Package Status npmjs Package Status

Table of Contents

Description

Configurable, lightweight back to top button for Angular projects.

Demo

Live demo here: https://www.ProAngular.com/demos/ngx-scroll-top

Installation

ng add @proangular/ngx-scroll-top@latest

or

npm install @proangular/ngx-scroll-top --save

Import NgxScrollTopModule where needed

...
+ import { NgxScrollTopModule } from '@proangular/ngx-scroll-top';
...

@NgModule({
  imports: [
    ...
+   NgxScrollTopModule
  ],
  ...
})
export class AppModule { }

Dependencies

Styling UX - Angular Material

You should have an Angular Material theme set up prior to using this. It's also possible to use this without an angular theme and style it yourself entirely!

More information on theming Angular Material: https://material.angular.io/guide/theming

Usage

Default (blue button with white icon)

<ngx-scroll-top></ngx-scroll-top>

Customization with optional inputs and icon

<ngx-scroll-top
  backgroundColor="#0D58C0"
  [bottomOffset]="footer.height"
  [displayAtYPosition]="1000"
  fontColor="#FFFAFA"
  fontSize="2rem"
  height="3rem"
  position="left"
  [zIndex]="1"
  width="3rem"
>&#8686;</ngx-scroll-top>

Component API

| Input | Value Typing | Default Value | Description | | ---------------------- | --------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | backgroundColor | string | '#0D58C0' (dark-blue) | Background color of the back to top button. Define any 'x' css property available for 'background-color: x'. | | bottomOffset | string | number | '0px' | Offset px from bottom of page when scrolled to bottom. For example this can be used to make sure the back to top button never overlaps a footer. | | displayAtYPosition | string | number | '420px' | The back to top button will not be displayed until the user scrolls to the provided Y (vertical px) coordinate on the page. | | fontColor | string | '#FFFFFF' (white) | The font color for the nested content within the back to top button. Define any 'x' css property available for 'color: x'. | | fontSize | string | '16px' | The font size for the nested content within the back to top button. Define any 'x' css property available for 'font-size: x'. | | height | string | '40px' | Height of back to top button in string px format. | | position | 'left' | 'right' | 'right' | Position on-screen where the back to top button is displayed. | | width | string | '40px' | Width of back to top button in string px format. | | zIndex | number | 999 | Style the z-index for the back to top button as needed for correct layer height adjustment. This can be useful when working with sticky headers. |

Compatibility

| Angular version | @proangular/ngx-scroll-top | Install | | --------------- | -------------------------- | ------------------------------------------ | | v14 | v1.x.x | ng add @proangular/ngx-scroll-top@latest | | v13 | v1.x.x | ng add @proangular/ngx-scroll-top@latest | | v12 | v1.x.x | ng add @proangular/ngx-scroll-top@latest |

Issues & Contribution

Please submit all issues, and feature requests here: https://github.com/ProAngular/ngx-scroll-top/issues

Contribution:

  1. Clone the repo and create a new branch:
  • git clone https://github.com/ProAngular/ngx-scroll-top.git
  • git checkout -b username/feature-or-bug-description
  1. Bump up the version of package in package.json and package-lock.json, commit all changes, push.
  • git add -A
  • git commit -m "My commit message"
  • git push origin username/feature-or-bug-description
  1. Submit code in published PR for review and approval. Add a good description and link any possible user stories or bugs.
  1. Allow CI actions to completely run and verify files.
  2. Add/ping reviewers and await approval.

Thank you for any and all contributions!

Donation

As a husband and father of four children, your donations mean the world to me! Any donations are greatly appreciated and keep me going!

License

Copyright © 2022 Cody Tolene

All content is licensed under the MIT license.