Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Introduction to ScrollTrigger | Scroll Animations and Mini Projects
JavaScript GSAP Animation Basics

bookIntroduction to ScrollTrigger

Scroll-based animations can create engaging, interactive web experiences by responding to user scroll actions. GSAP's ScrollTrigger plugin is a powerful tool that allows you to trigger and control animations as elements enter, leave, or move through the viewport. You will use ScrollTrigger when you want your animations to respond directly to scroll position, such as animating sections as they appear on screen, pinning elements, or syncing animation progress with the scroll bar. This approach is widely used for landing pages, storytelling sites, and interactive infographics where scroll progress drives the narrative and visual effects.

index.html

index.html

copy

When configuring ScrollTrigger, several key options give you control over how and when your animation plays:

  • trigger: the element that ScrollTrigger watches for entering or leaving the viewport;
  • start: defines when the animation should start relative to the trigger and viewport (for example, "top 80%" means the top of the trigger hits 80% down the viewport);
  • end: sets when the animation should end (for example, "top 30%" means the top of the trigger reaches 30% down the viewport);
  • scrub: links the progress of the animation to the scrollbar, so the animation plays smoothly as you scroll;
  • toggleActions: specifies what actions to take when entering or leaving the trigger area, using a sequence like "play reverse play reverse" (onEnter, onLeave, onEnterBack, onLeaveBack).

By adjusting these options, you can create a wide variety of scroll-based effects—from simple fade-ins to complex, scroll-synced storytelling.

question mark

What is the main purpose of the ScrollTrigger plugin in GSAP?

Select the correct answer

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 1

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Awesome!

Completion rate improved to 7.69

bookIntroduction to ScrollTrigger

Свайпніть щоб показати меню

Scroll-based animations can create engaging, interactive web experiences by responding to user scroll actions. GSAP's ScrollTrigger plugin is a powerful tool that allows you to trigger and control animations as elements enter, leave, or move through the viewport. You will use ScrollTrigger when you want your animations to respond directly to scroll position, such as animating sections as they appear on screen, pinning elements, or syncing animation progress with the scroll bar. This approach is widely used for landing pages, storytelling sites, and interactive infographics where scroll progress drives the narrative and visual effects.

index.html

index.html

copy

When configuring ScrollTrigger, several key options give you control over how and when your animation plays:

  • trigger: the element that ScrollTrigger watches for entering or leaving the viewport;
  • start: defines when the animation should start relative to the trigger and viewport (for example, "top 80%" means the top of the trigger hits 80% down the viewport);
  • end: sets when the animation should end (for example, "top 30%" means the top of the trigger reaches 30% down the viewport);
  • scrub: links the progress of the animation to the scrollbar, so the animation plays smoothly as you scroll;
  • toggleActions: specifies what actions to take when entering or leaving the trigger area, using a sequence like "play reverse play reverse" (onEnter, onLeave, onEnterBack, onLeaveBack).

By adjusting these options, you can create a wide variety of scroll-based effects—from simple fade-ins to complex, scroll-synced storytelling.

question mark

What is the main purpose of the ScrollTrigger plugin in GSAP?

Select the correct answer

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 1
some-alt