New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-scroll-button

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-button

Show a scroll button when you scrolled the page.

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

react-scroll-button

npm version

Live Demo

Demo

How to Install

npm i react-scroll-button

Usage

import React from 'react';
import ScrollButton from 'react-scroll-button';

const ScrollComponent = () => {
  return (
    <ScrollButton
      behavior="smooth"
      buttonBackgroundColor="red"
      iconType="arrowUp"
      style={{ fontSize: '24px' }}
    />
  );
};

Properties

PropertyDescriptionDefaultValueType
targetIdId of element that you want to go''string
behaviorScroll type. 'auto', 'smooth'autostring
buttonBackgroundColorBackgroundColor of button'green'string
buttonColorColor of icon'white'string
iconTypeIcon type 'up','arrowUp', 'caretUp''up'string
scrollSpeedIt specifies speed of the scroll button.'1s'string
buttonVisibleHeightIt specifies that the scroll button will be visible at what height on the page50number
styleWrite custom css properties{ }object

License MIT

Keywords

scroll

FAQs

Package last updated on 15 Jun 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