Skip to content

omer-ayhan/react-smoothy-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-smoothy-scroll

NPM version

Smooth scrolling for React.js with easy to use component(Not supported in React Native)

Installation

With Yarn
 yarn add react-smoothy-scroll
With NPM
npm i react-smoothy-scroll

Basic Usage

import SmoothScroll from "react-smoothy-scroll";

<SmoothScroll toId="navbar" duration={1500} allowScroll={true}>
	<p>Scroll To Navbar</p>
</SmoothScroll>;

Properties

Prop Default Type Description
toId undefined string target id for smooth scrolling
toRef null RefObject target ref object for smooth scrolling
duration 1000 number duration of the smooth scroll
children undefined ReactNode react children
allowScroll true bool if false scrolling will be disabled

Inspired by Filip Kubík

About

my own npm package for smooth scroll in reactjs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published