
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
react-mouse-parallax
Advanced tools
<Parallax move={{ top: 10, left: 3, type: "%" }}> <img src="/file.png" /> </Parallax>
The Parallax component is required to place the animation element. In the move argument, you must pass an offset from top, bottom, left, or right (or a combination). You must also specify the type (in pixels or percentages). Now the mouse will move when moving. If there are errors, write.
const ref = useParallax({ bottom: 10, right: 5, type: "px" })
You can also use the useParallax hook instead of a component. Next, you need to attach the reference to the desired block.
Example: https://github.com/KirillUsenko/examples-react-mouse-parallax
<Parallax move={{ top: 10, left: 3, type: "%" }}> <img src="/file.png" /> </Parallax>
Нужно внутрь компонента Parallax вместить элемент для анимации. В аргумент move нужно передать смещение сверху, снизу, слева или справа (или совмещать). Также надо указать тип смещения (в пикселях или в процентах). Теперь при движении мыши элементы будут двигаться. Если будут ошибки, то пишите.
const ref = useParallax({ bottom: 10, right: 5, type: "px" })
Также вместо компонента вы можете использовать хук useParallax. Далее нужно референс прикрепить к нужному блоку.
Пример: https://github.com/KirillUsenko/examples-react-mouse-parallax
if you like the library, you can buy it on privjs.
https://app.privjs.com/my-package?pkg=react-mouse-parallax
Well, or you can throw money on the card 2200 7005 0030 3994)
FAQs
React js library for parallax on mouse movement
We found that react-mouse-parallax 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.