0.9.3 • Published 2 years ago

react-smoothy-scroll v0.9.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-smoothy-scroll

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

PropDefaultTypeDescription
toIdundefinedstringtarget id for smooth scrolling
toRefnullRefObjecttarget ref object for smooth scrolling
duration1000numberduration of the smooth scroll
childrenundefinedReactNodereact children
allowScrolltrueboolif false scrolling will be disabled

Inspired by Filip Kubík

0.9.3

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago