Skip to main content
GSAP Animation TutorialArticle 15

GSAP ScrollTrigger Start & End: Master Scroll Trigger Positions

Understand exactly which points meet, where an active range begins, and how to debug precise scroll positions across responsive layouts.

GSAP ScrollTrigger Start and End Positions Tutorial - NavTechSolution

Blog #14 introduced start: "top 80%". But what does that string actually mean? A ScrollTrigger position usually describes a relationship between one point on the trigger element and one point on the viewport.

gsap.from(".card", {
  y: 60,
  opacity: 0,
  duration: 0.8,
  scrollTrigger: {
    trigger: ".card",
    start: "top 80%"
  }
});
TRIGGER ELEMENTTOPCENTERBOTTOM
meets
VIEWPORT0% / TOP50% / CENTER80%100% / BOTTOM
top 80% = trigger top meets viewport 80%
Two measured points meet to define the start.

What you will learn

1

Read start syntax from left to right

2

Map top, center, bottom and percentages

3

Understand start and end as an active range

4

Use markers and scoped playgrounds safely

5

Apply pixels, offsets and function values

6

Debug responsive and dynamic layouts

1. Start syntax anatomy

Read the first token as a point on the trigger and the second as a point on the scroller or viewport.

start: "top center"
topTrigger element pointcenterViewport point
The left value belongs to the trigger. The right value belongs to the viewport.

2. Trigger positions

top, center and bottom identify three useful points on the watched element.

TOPCENTERBOTTOM
A taller trigger places more physical distance between these points than a short card.

3. Viewport positions

The same words can identify viewport points. Their role is determined by their position as the second token.

TOP · 0%CENTER · 50%BOTTOM · 100%

4. top top

The trigger element top meets the viewport top. While scrolling down, this generally activates later than a start line near the viewport bottom.

VIEWPORT TOPELEMENT TOP
ELEMENT
START

5. top center

The trigger top reaches the viewport center—a clear midpoint for focused sections.

VIEWPORT CENTERELEMENT TOP
Top meets center

6. top bottom

The trigger top reaches the viewport bottom, so activation usually occurs as the element begins entering from below. That can be useful, but may feel early for some reveals.

VIEWPORT BOTTOMELEMENT TOP
Element begins entering

7. Compare top positions

START · CENTERTRIGGER

Current: start: "top center" — trigger top meets viewport center.

8. Percentage viewport positions

A percentage is measured down the viewport: 0% is its top, 50% its center and 100% its bottom.

0%
25%
50%
75%
80%
100%

9. Why top 80% is common

A lower start line can begin an entrance shortly after content becomes visible. Eighty percent is not universal: element size, animation duration, reading flow, viewport size and design intent all matter.

10. center center

The trigger center meets the viewport center. This relationship can suit a large, focused interactive section.

TRIGGER CENTER
+
VIEWPORT CENTER
CENTERS MEET

11. bottom center

The trigger bottom reaches the viewport center, which happens later than top center for the same element.

top centerTop crosses center
then
bottom centerBottom crosses center

12. bottom top

The trigger bottom reaches the viewport top. It is especially useful when reasoning about where a section's active range should finish.

VIEWPORT TOPELEMENT BOTTOMPOSITION MET

13. Start position matrix

ValueTrigger pointViewport point
top topTopTop
top centerTopCenter
top bottomTopBottom
center centerCenterCenter
bottom centerBottomCenter
bottom topBottomTop
top 80%Top80% position

14. What is end?

scrollTrigger: {
  trigger: ".section",
  start: "top 80%",
  end: "bottom 20%"
}

start opens ScrollTrigger's active range and end closes it. An ordinary entrance tween still plays according to its own duration. End becomes especially significant for progress, callbacks, toggle behavior and later lessons about scrub and pin.

STARTACTIVE RANGEEND

15. end: "bottom top"

The range begins when the section top meets viewport 80%, and ends when its bottom meets viewport top.

START · top 80%
SECTION
END · bottom top
The element travels through two separate meeting relationships.

16. Start and end together

The start and end strings create a scroll-space interval. They do not describe seconds.

SCROLL ↓Section top meets 80%ACTIVE RANGESection bottom meets top

17. ScrollTrigger markers

scrollTrigger: {
  trigger: ".marker-section",
  start: "top 80%",
  end: "bottom 20%",
  markers: true
}

Markers reveal start, end, trigger and scroller positions during development. Keep them scoped and remove them from production.

18. A production-safe marker graphic

START · trigger/scroller meeting
TRIGGER ELEMENT
END · trigger/scroller meeting
This diagram teaches markers without enabling debug overlays globally.

19. Start position playground

CURRENT STARTtop 80%
START · 80%TRIGGER
Trigger point
Top of element
Viewport point
80% of viewport

Start when the element's top reaches 80% of the viewport.

20. End position playground

START · top 80%END · bottom top

Active range: top 80% → bottom top.

21. Start and end playground

START · top 80%ACTIVE RANGEEND · bottom top

Active range: top 80% → bottom top.

22. Pixel-based positions

ScrollTrigger also accepts numeric positions. A numeric value represents an absolute scroll position, while a string such as "top 300px" compares trigger top with a viewport position 300 pixels from the top.

scrollTrigger: {
  trigger: ".section",
  start: "top 300px"
}

23. Relative offsets

"top bottom-=100px" starts with a top-to-bottom relationship, then moves the scroller point 100 pixels above the viewport bottom. Use offsets deliberately and verify them on responsive layouts.

top bottom− 100pxtop bottom-=100px

24. A relative end distance

end: "+=500" defines an end 500 pixels after the calculated start. This will become useful for scrub and pin, but it does not make an ordinary tween last 500 pixels.

START+500px distanceEND

25. Function-based start and end

Functions are evaluated when ScrollTrigger calculates positions, which helps when a value depends on runtime layout.

scrollTrigger: {
  trigger: section,
  start: () => "top 80%",
  end: () => "+=" + Math.max(300, section.offsetHeight)
}

26. Trigger element size matters

SHORT CARDtopcenterbottom
TALL SECTIONtopcenterbottom
The same string can feel different because the element's points are farther apart.

27. Viewport size matters

DESKTOP80%
MOBILE80%
Eighty percent resolves to a different physical pixel position on each viewport.

28. Practical heading reveal

NavTechSolution

Start When This Section Reaches 80%

The section is watched; its heading is animated.

29. Practical image reveal

Viewport PositionWrapper trigger · Visual target

The horizontal distance is reduced on small screens in the scoped JavaScript.

30. Practical card grid

TriggerScrollTrigger concept
StartScrollTrigger concept
EndScrollTrigger concept
MarkersScrollTrigger concept

Its end defines the range but does not control this stagger tween's duration.

31. A start that may feel early

top bottom can activate as an element begins entering. That is not wrong; it simply may feel early for some content reveals.

32. A start that may feel late

With top 20%, the user may scroll far into a section before its animation begins. Special designs may need it, while ordinary reading content often benefits from an earlier cue.

33. Find the right trigger position

  1. Start with a reasoned value such as top 80%.
  2. Temporarily inspect markers.
  3. Scroll at a natural reading pace.
  4. Test desktop and mobile.
  5. Adjust for the actual content.
  6. Disable production markers.

34. Trigger versus start

triggerWhich element is watched?.services
+
startWhen relative to viewport?top 80%

35. Start versus duration

start determines activation in scroll space. duration: 1 determines one second of time-based playback.

SCROLL POSITIONSTARTANIMATION TIME0s ━━━━━━━━━ 1s

36. End versus duration

end is the range endpoint; duration belongs to the tween. This distinction is essential before learning scrub.

37. Start and end with a timeline

const tl = gsap.timeline({
  scrollTrigger: {
    trigger: ".start-end-timeline",
    start: "top 75%",
    end: "bottom 25%"
  }
});

tl.from(".timeline-title", { y: 40, opacity: 0 })
  .from(".timeline-card", { y: 30, opacity: 0, stagger: 0.1 });

The start and end belong to the ScrollTrigger controlling the complete timeline.

38. Multiple sections

SECTION Astart: top 80%
SECTION Bstart: top 80%
SECTION Cstart: top 80%

A scoped loop can give each section its own trigger without affecting unrelated cards.

39. Dynamic content and refresh

ScrollTrigger calculates positions from layout. After a meaningful change—dynamic content, an opened accordion, a resized image, a font shift or inserted DOM—ScrollTrigger.refresh() may be appropriate. Do not call it on every scroll.

40. Resize behavior

Viewport changes affect percentages, element geometry and active ranges. ScrollTrigger handles common refresh behavior, but developers must still test real responsive layouts.

41. Common start/end mistakes

1. Reversing the two tokens mentally
2. Thinking both tokens describe the viewport
3. Thinking both tokens describe the trigger
4. Confusing target and trigger
5. Treating start as duration
6. Treating end as tween duration
7. Using end without a reason
8. Leaving markers enabled
9. Ignoring mobile offsets
10. Stacking triggers while rebuilding
11. Ignoring layout changes
12. Refreshing continuously
13. Hard-coding every position
14. Treating top 80% as universal
15. Skipping tall-section tests
16. Skipping short-element tests

42. Debugging wrong positions

Starts too early?Check start, trigger and viewport point.
Starts too late?Check element size, percentage and spacing.
End looks wrong?Check syntax, height, dynamic layout and markers.
Changes after load?Inspect images, fonts and inserted content.

43. Main Start & End Lab

NavTechSolution

Master Scroll Positions

Understand exactly when scroll animations activate and when their active ranges end.

Trigger
Start
End
Viewport
START · top 80%
LAB SECTION
ACTIVE RANGEEND · bottom top
Trigger
Lab section
Trigger point
Top of element
Viewport point
80% of viewport
Meaning
Start when the element's top reaches 80% of the viewport.

Lab ready. Debug markers are off.

44. Lab animation lifecycle

Kill owned timeline + triggerReset lab partsBuild selected rangeRefresh positions

45. Live position explanation

The lab translates syntax into plain language. Choose top center and it reports “top of element” plus “center of viewport”; choose center center and both centers must meet.

46. Scoped marker toggle

The marker checkbox is off by default. When enabled, only the lab-owned ScrollTrigger is rebuilt with markers; no other trigger is killed or changed.

47. Mini challenge

NavTechSolution

Control the Trigger Point

Start this animation when the section top reaches 75% of the viewport.

Start
End
Markers
Show suggested solution
const challenge = document.querySelector(".start-end-challenge");

if (challenge) {
  const tl = gsap.timeline({
    scrollTrigger: {
      trigger: challenge,
      start: "top 75%",
      end: "bottom 25%"
    }
  });

  tl.from(challenge.querySelector(".challenge-label"), { y: 15, opacity: 0 })
    .from(challenge.querySelector(".challenge-title"), { y: 35, opacity: 0 }, "-=0.1")
    .from(challenge.querySelector(".challenge-text"), { y: 20, opacity: 0 }, "-=0.3")
    .from(challenge.querySelectorAll(".challenge-card"), {
      y: 30, opacity: 0, stagger: 0.1
    }, "-=0.2");
}

48. Quick reference

ValueMeaning
top topTrigger top meets viewport top
top centerTrigger top meets viewport center
top bottomTrigger top meets viewport bottom
top 80%Trigger top meets viewport 80%
center centerTrigger center meets viewport center
bottom centerTrigger bottom meets viewport center
bottom topTrigger bottom meets viewport top
end: "+=500"End 500px after start
markers: trueShow development markers

49. Cheat sheet graphic

STARTtop 80%top = trigger80% = viewport
COMMONtop toptop centercenter centerbottom top
RANGESTARTACTIVE RANGEEND

50. Final mental model

trigger: ".section"Which element do we watch?start: "top 80%"When does the range begin?end: "bottom top"When does the range finish?LEFT TOKEN = TRIGGER · RIGHT TOKEN = VIEWPORT

51. Continue with Blog #16

We now understand trigger, start and end. Continue with GSAP ScrollTrigger Scrub to connect animation progress directly to scroll direction and distance.

gsap.to(".scrub-box", {
  x: 400,
  scrollTrigger: {
    trigger: ".scrub-section",
    start: "top center",
    end: "bottom center",
    scrub: true
  }
});

Continue the GSAP series

Review GSAP stagger, timelines, timeline controls, timeline position parameters, timeline + stagger, and the previous ScrollTrigger tutorial.

Frequently asked questions

What does start mean in GSAP ScrollTrigger?

Start defines the scroll position where a ScrollTrigger active range begins and its configured behavior can activate.

What does end mean in GSAP ScrollTrigger?

End defines where the active range finishes. It does not automatically change the duration of an ordinary time-based tween.

What does start: "top 80%" mean?

It means the top of the trigger element meets the point 80 percent down the viewport.

What does "top center" mean in ScrollTrigger?

The trigger element top must meet the center of the viewport.

What does "center center" mean?

The center of the trigger element meets the center of the viewport.

What does "bottom top" mean?

The bottom of the trigger element meets the top of the viewport.

What is the difference between start and end?

Start opens the active range; end closes it.

Does ScrollTrigger end control animation duration?

Not for an ordinary entrance tween. Duration still controls its time-based playback.

How do ScrollTrigger percentages work?

A viewport percentage describes a point from its top: 0 percent is top, 50 percent is center and 100 percent is bottom.

How do I debug ScrollTrigger start and end positions?

Check the trigger selector, temporarily enable markers for that trigger, inspect layout dimensions and test the position on multiple viewport sizes.

Should I use markers in production?

No. Markers are a development aid and should normally be disabled before release.

Does viewport size change ScrollTrigger positions?

Yes. Percentage positions and element geometry resolve to different pixels as the viewport changes.

Can I use pixel offsets in ScrollTrigger?

Yes. ScrollTrigger supports pixel values and relative offsets such as top+=100 center and an end distance such as +=500.

Can I use ScrollTrigger start and end on a PHP website?

Yes. PHP renders the HTML while GSAP and ScrollTrigger run in the browser.