1.0.4 • Published 5 months ago

smooth-scroll-ak v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Smooth Scroll AK

A customizable smooth scrolling library for ReactJS applications. This package provides fluid, momentum-based scrolling with adjustable settings for momentum, touch, and speed.


Installation

Install the package using npm:

npm install smooth-scroll-ak

Or using yarn:

yarn add smooth-scroll-ak

Usage

Wrap your content with the SmoothScroll component to enable smooth scrolling:

import React from 'react';
import SmoothScroll from 'smooth-scroll-ak';

const App = () => {
  return (
    <SmoothScroll momentum={0.2} touchMomentum={0.1} speed={0.1}>
      <div style={{ height: '200vh' }}>
        <h1>Smooth Scrolling Example</h1>
        <p>Scroll down to see the smooth scrolling effect.</p>
      </div>
    </SmoothScroll>
  );
};

export default App;

Props

PropTypeDefaultDescription
momentumnumber0.1Controls the momentum effect on mouse wheel scroll.
touchMomentumnumber0.05Controls the momentum effect on touch scroll.
speednumber0.05Controls the speed of the smooth scrolling animation.

Features

  • Fluid, Momentum-based Scrolling: Smooth and natural scrolling experience.
  • Customizable Settings: Adjust momentum, touchMomentum, and speed to fit your needs.
  • Peer Dependency Support: Compatible with React 17 and 18.
  • Browser Compatibility: Works with all modern browsers.

Peer Dependencies

This package requires the following peer dependencies:

  • react (v17 or v18)
  • react-dom (v17 or v18)

Ensure these are installed in your project to avoid compatibility issues.


License

MIT


Author

Developed by Mohd Akram Uddin.


Contributing

Feel free to contribute or report issues on GitHub.

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.0

5 months ago