Add the margin option the inView function as per the docs
4. Expected behavior
With a negative value X as the first value in the margin property, I expect the target element to not appear until it is X pixels down the screen - not as soon as it appears on screen. With a positive value X, I expect the animation to occur when the element is off the bottom of the screen by X pixels.
1. Describe the bug
Adding margin to inView element seems to have no effect. Animations are triggered as soon as they enter the viewport regardless of any margin setting.
2. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/sandpack-project-s9h5mf?file=%2Fsrc%2Findex.js&from-sandpack=true
3. Steps to reproduce
Steps to reproduce the behavior:
Add the margin option the inView function as per the docs
4. Expected behavior
With a negative value X as the first value in the margin property, I expect the target element to not appear until it is X pixels down the screen - not as soon as it appears on screen. With a positive value X, I expect the animation to occur when the element is off the bottom of the screen by X pixels.
5. Video or screenshots
N/A
6. Browser details
Windows, Firefox, Chrome