Skip to content

How do you stop the effect when the element is in the middle of the view #133

@Barbara-Monzu

Description

@Barbara-Monzu

I need to stop scrolling when an image lands inside a card, but endScroll doesn't work for me. Any suggestion?
I don't know how to stop it.

Thanks!

 const { ref } = useParallax({
    speed: 20,
    translateY: [0, 400, 'easeInOut'],
    translateX: [0, -3, 'easeInOut'],
    rotateY: [0, 0],
    scale: [1.2, 0.85, 'easeOutBack'],
  });

<Parallax>
            <div
              ref={ref as React.RefObject<HTMLDivElement>}>
              <Image src="/nft-2.jpeg" width={350} height={350} />
            </div>
          </Parallax>

<img width="1128" alt="issue 2" src="https://user-images.githubusercontent.com/91007055/152975017-280c1776-8688-4a95-ae54-5058bd72fd3b.png">

<img width="1135" alt="issue" src="https://user-images.githubusercontent.com/91007055/152974939-73c161ad-b8f3-4ced-8818-2a28b38156fa.png">

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions