19.0.0 • Published 9 months ago

@proangular/ngx-scroll-top v19.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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

Using Node Package Manager (NPM) in a new terminal window run the following commands to install the required dependencies.

Prerequisites

Angular Material

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

ng add @angular/material

Install Scroll Top Component

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

or

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

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

InputValue TypingDefault ValueDescription
backgroundColorstring'#0D58C0' (dark-blue)Background color of the back to top button. Define any 'x' css property available for 'background-color: x'.
bottomOffsetstring | 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.
displayAtYPositionstring | 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.
fontColorstring'#FFFFFF' (white)The font color for the nested content within the back to top button. Define any 'x' css property available for 'color: x'.
fontSizestring'16px'The font size for the nested content within the back to top button. Define any 'x' css property available for 'font-size: x'.
heightstring'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.
widthstring'40px'Width of back to top button in string px format.
zIndexnumber999Style 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-topStatus
v19v19.0.0Compatible
v18------Untested
v17------Untested
v16------Untested
v15------Untested
v14v1.x.xCompatible
v13v1.x.xCompatible
v12v1.x.xCompatible

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!

Licensing

This project is licensed under the MIT License. See the LICENSE file for the pertaining license text.

SPDX-License-Identifier: MIT

Wrapping Up

Thank you to the entire Angular team and community for such a great framework to build upon. If you have any questions, please let me know by opening an issue here.

TypeInfo
webmaster@codytolene.com
https://github.com/sponsors/CodyTolene
https://www.buymeacoffee.com/codytolene
bc1qfx3lvspkj0q077u3gnrnxqkqwyvcku2nml86wmudy7yf2u8edmqq0a5vnt

Fin. Happy programming friend!

Cody Tolene

19.0.0

9 months ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.8

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago