Jump to content
Search Community

Michal_Ant

Members
  • Posts

    3
  • Joined

  • Last visited

Michal_Ant's Achievements

0

Reputation

  1. Thanks for help and explanation. Very appreciate!
  2. Thanks for super fast response! I just installed the package and tested it. Now it works, but still have issues with certain toggleActions values function Component({delay}){ const target = useRef() useEffect(()=>{ gsap.registerPlugin(ScrollTrigger) gsap.to(target.current, {opacity: 1, visibility: 'visible', y:0, duration: 1, delay: delay, scrollTrigger: { trigger: target.current, start: "top 90%", toggleActions: "play none none none", // this works perfectly //toggleActions: "restart none none none", // this doesn't delay animation }}) },[]) return( <ContainerAnimated ref={target}> // ... other child components </ContainerAnimated> ) } Would be greatful for any hint *edited: delay value is comming from props and it is a number
  3. Hey! Got the same problem with delay not working with ScrollTrigger and React, just like @Bornfight has discribed. Is there any chance that version 3.6.2 will appear on NPM ? I'd like to be consistent and stick to using modules. Cheers!
×
×
  • Create New...