react-smooth-scroller-hook
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

React Smooth Scroller Hook

Simple React hook for Smooth Scrolling Effect

Usage

import useSmoothScroller from "react-smooth-scroller-hook";

const App = ()=>{
    const {container,spacer} = useSmoothScroller(0.8);
    return (
        <>
            <div ref={container}>Add your content here</div>
            <div ref={spacer}></div>
        </>
    )
}

Arguments

  • ease:number = 0.4 [min=0,max=1]

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    0
    • latest

Version History

Package Sidebar

Install

npm i react-smooth-scroller-hook

Weekly Downloads

0

Version

1.0.0

License

no licence

Unpacked Size

13.8 kB

Total Files

11

Last publish

Collaborators

  • theshawa