Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-simple-scroll-up

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-scroll-up

A minimal lightweight react component for adding a nice scroll up (back to top) button with onScroll progress.

  • 0.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
73
decreased by-1.35%
Maintainers
1
Weekly downloads
 
Created
Source

React Simple Scroll up (back to top)

A minimal lightweight react component for adding a nice scroll up (back to top) with onScroll progress.

NPM JavaScript Style Guidenpm bundle sizeGitHub

screenshot

Install

npm
npm i react-simple-scroll-up
Yarn
yarn add react-simple-scroll-up

Examples

import React from 'react'
import { ScrollToTop } from 'react-simple-scroll-up'

const MyComponent = () => {
  return (
    <div className='App'>
      <ScrollToTop {/* Props */} />
    </div>
  )
}

Props

PropTypeOptionsDescriptionDefault
sizenumberOptionalSet button width and height (in pixels)50
offsetTopnumberOptionalShow button after number of pixels that document has scrolled vertically100
bgColorstringOptionalButton background colorrgb(0 0 0 / 75%)
strokeWidthnumberOptionalScroll progess bar width (in pixels)4
strokeFillColorstringOptionalScroll progess bar fill colorrgb(0 0 0 / 50%)
strokeEmptyColorstringOptionalScroll progess bar empty colorrgb(200 200 200 / 85%)
symbolstring or ReactNodeOptionalUse any HTML Symbols by simply copy/paste it OR any custom element, e.g. FontAwesomeIcon🡩
symbolSizenumberOptionalSymbol font size (in pixels). Only applies when symbol is a string.20
symbolColorstringOptionalSymbol color.#fff
onScrollingfunctionOptionalCallback function that is triggered while scrolling with value passed-
onScrollEndfunctionOptionalCallback function that is triggered when scroll is ended-
classNamestringOptionalCSS class nameto-top-progress
styleReact.CSSPropertiesOptionalCSS style-

Edit react-simple-scroll-up

License

MIT © awran5

Keywords

FAQs

Package last updated on 18 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc