GSAP

				
					<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.7/dist/gsap.min.js"></script>
				
			
				
					gsap.to(".selector", {
  delay: 0.5,
  duration: 1,
  ease: "power2.inOut",
  x: 100, 
  backgroundColor: "red",
  stagger: 0.1, 
});
				
			
				
					gsap.from(".selector", {
  delay: 0.5,
  duration: 1,
  ease: "power2.inOut",
  x: 100, 
  backgroundColor: "red",
  stagger: 0.1, 
});
				
			
				
					let tl = gsap.timeline();

tl
.to('.selector', {
duration: 1, 
x: 50, 
y: 0 
})
.to('.selector', {
duration: 1, 
x: 50, 
y: 0 
})

				
			
				
					let tl = gsap.timeline();

tl
.to('.selector', {
duration: 1, 
x: 50, 
y: 0 
})
.to('.selector', {
duration: 1, 
x: 50, 
y: 0 
},'-=0.7')

				
			
				
					const elements = document.querySelectorAll('.selector');
elements.forEach(element =>{
gsap.to(element, {
  delay: 0.5,
  duration: 1,
  ease: "power2.inOut",
  x: 100, 
  backgroundColor: "red",
  stagger: 0.1, 
});
});
				
			

פיצול טקסט

				
					<script src="https://unpkg.com/split-type"></script>
				
			
				
					const text = new SplitType('.my-text');
				
			

גלילה חלקה

				
					<script src="https://unpkg.com/lenis@1.1.22/dist/lenis.min.js"></script>
				
			
				
					const lenis = new Lenis({
  autoRaf: true,
  duration:2,
});
lenis.on('scroll', ScrollTrigger.update);
gsap.ticker.add((time) => {
  lenis.raf(time * 1000); 
});
gsap.ticker.lagSmoothing(0);
				
			

אנימציות בגלילה

				
					<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
				
			
				
					gsap.to(".selector", {
  duration: 1,
  ease: "power2.inOut",
  x: 100, 
  scrollTrigger: {
        trigger: '.selector',
        start: 'top 50%',
        toggleActions: "play play none reverse",
        },
});
				
			
				
					gsap.to(".selector", {
  duration: 1,
  ease: "power2.inOut",
  x: 100, 
  scrollTrigger: {
        trigger: '.selector',
        start: 'top 50%',
        end: '+=500',
        scrub: 1,
        pin: true,
        toggleActions: "play play none reverse",
        },
});
				
			
				
					let tl = gsap.timeline({
  scrollTrigger: {
    trigger: '.selector',
    start: 'top 50%',
    end: '+=500',
    scrub: 1,
    pin: true,
    toggleActions: "play play none reverse",
  }
});

tl
.to('.selector', {
duration: 1, 
x: 50, 
y: 0 
})
.to('.selector', {
duration: 1, 
x: 50, 
y: 0 
},'-=0.7')

				
			
				
					const elements = document.querySelectorAll('.my-element');
elements.forEach(element =>{
gsap.to(element, {
  ease: "none",
  y: -500,
  scrollTrigger: {
        trigger: element,
        start: 'top bottom',
        end:'bottom top',
        scrub:true,
        toggleActions: "play play none reverse",
        },
});
});