Socket
Socket
Sign inDemoInstall

use-smooth-horizontal-scroll

Package Overview
Dependencies
5
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"name": "use-smooth-horizontal-scroll",
"version": "0.1.0",
"version": "0.2.0",
"description": "This package provides a custom hook for smooth horizontal scrolling in React. The hook allows for setting a scroll container, handling scroll events, scrolling to a specific point, and determining if the user is at the start or end of the scrollable area.",

@@ -5,0 +5,0 @@ "author": "progrmoiz",

@@ -24,4 +24,6 @@ # Smooth Horizontal Scroll

```tsx
const { scrollContainerRef, handleScroll, scrollTo, isAtStart, isAtEnd } = useSmoothHorizontalScroll();
```
You'll need to pass the `scrollContainerRef` to the element you want to apply the smooth scrolling to, and attach the `handleScroll` function to the `onScroll` event of that element.

@@ -28,0 +30,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc