
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
react-use-scroll-snap
Advanced tools
A minimal React Hook for JavaScript scroll snapping. The Hook primarily snaps to elements using the wheel and touchmove events. Please reference the example folder on how to use the Hook.
Property | Type | Default | Description | Required |
---|---|---|---|---|
ref | React.RefObject<HTMLElement> | N/A | Parent element of the scroll items. | Yes |
duration | number | 100 | Snap animation length in miliseconds. | No |
isArrowKeysEnabled | boolean | True | Enables the up and down arrow keys for snapping. | No |
isDirectionEnabled | boolean | True | Prioritizes scroll direction over element visibility in the viewport. | No |
Property | Type | Description |
---|---|---|
state | React.RefObject<ScrollState> | The internal state object used to track scroll information. |
goto | (index: number) => void | A function that will scroll to the element at the specified index. |
The package can be installed using npm. The package is written in TypeScript and exports the type declaration file in the distribution.
npm install react-use-scroll-snap
This project is licensed under the MIT License - see the LICENSE.md file for details.
FAQs
A React Hook for JavaScript scroll snapping.
The npm package react-use-scroll-snap receives a total of 453 weekly downloads. As such, react-use-scroll-snap popularity was classified as not popular.
We found that react-use-scroll-snap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.