
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@studio-freight/react-locomotive-scroll
Advanced tools
A locomotive-scroll React wrapper
Explore Locomotive Scroll docs »
Report Bug
·
Request Feature
To get a local copy up and running follow these simple steps.
$ npm install locomotive-scroll react-locomotive-scroll
or using Yarn
$ yarn add locomotive-scroll react-locomotive-scroll
import { LocomotiveScrollProvider } from 'react-locomotive-scroll'
const containerRef = useRef(null)
<LocomotiveScrollProvider
options={
{
smooth: true,
// ... all available Locomotive Scroll instance options
}
}
watch={
[
//...all the dependencies you want to watch to update the scroll
]
}
containerRef={containerRef}
>
<main data-scroll-container ref={containerRef}>
{/* ...your app */}
</main>
</LocomotiveScrollProvider>
data-scroll-section
to prevent weird behavioursexport function Page() {
return (
<div data-scroll-section>
{/* ...your page */}
</div>
)
}
import { useLocomotiveScroll } from 'react-locomotive-scroll'
export function Component() {
const { scroll } = useLocomotiveScroll()
// ... your component
}
At this time you should be able to do whatever your want using the scroll object.
For more examples and to use Locomotive Scroll, please refer to their Documentation
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Antoine Lin - @vahilloff - contact@antoinelin.com
Project Link: https://github.com/toinelin/react-locomotive-scroll
Please feel free to open a pull request to add your project to the list!
FAQs
A locomotive-scroll React wrapper
We found that @studio-freight/react-locomotive-scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.