Skip to content

weianofsteel/react-scroll-up-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-scroll-up-btn

Source code at https://github.com/weianofsteel/react-scroll-up-button

Installation

npm install --save react-scroll-up-btn

or

yarn add react-scroll-up-btn

Usage

import React from 'react';
import ScrollUpButton from 'react-scroll-up-btn';

function Demo(){
    return(
        <React.Fragment>
            <div>
                <ScrollUpButton 
                    behavior={'smooth'}
                    IconSize={'5rem'}
                    appearCoordinate={1200}
                />    
            </div> 
        </React.Fragment>
    )
}

export default Demo;

Props

Name Type Default
behavior 'smooth' 'auto'
IconSize '?px' or '?rem' '60px'
appearCoordinate number(scrollY) 1200

About

A simple scroll up button built with react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published