Overview
Scroll triggers detect scroll behavior within any page or scrollable container and fire depending on that behavior. Scroll triggers can fire when the user begins scrolling, while the user scrolls, when the user stops scrolling, when the scroll fully decelerates, or when the user taps the status bar.
Trigger Properties
State
Set the trigger to fire when the scroll begins, while scrolling, when the scroll ends, when the scroll fully decelerates, or when the status bar is tapped:
Begin Dragging: Fires once when the user begins scrolling.
While Scrolling: Fires continuously as the content scrolls.
End Dragging: Fires once when the user lifts their finger after scrolling.
Deceleration Ended: Fires once when the scroll decelerates to a complete stop.
Tapped Status Bar: Fires when the user taps their device’s status bar.
Direction
Set if the trigger should fire when the user scrolls Up, Down, Left, Right, Horizontally, Vertically, or in any direction. This property is only available if the State is Begin Dragging or While Scrolling.
Only Trigger on Drag
Limits the trigger to only fire while your finger is dragging the scroll. The trigger will not fire when the
Trigger within Range
Set a range for this trigger to fire within based on the total scrollable area.
From: The percent value when the scroll trigger should begin firing.
To: The percent value when the scroll trigger should stop firing.
Is Enabled
Set if the trigger should fire when the trigger's conditions are met.
Expression Editor Properties
Location X
trigger.locationX
The horizontal location of your finger in relation to the object the trigger is on.
Location Y
trigger.locationY
The vertical location of your finger in relation to the object the trigger is on.
Velocity X
trigger.velocityX
Horizontal velocity of your finger while panning.
Velocity Y
trigger.velocityY
Vertical velocity of your finger while panning.
Scroll Velocity X
trigger.scrollVelocityX
Horizontal velocity of the scroll as it decelerates.
Scroll Velocity Y
trigger.scrollVelocityY
Vertical velocity of the scroll as it decelerates.
Scroll Offset X
trigger.scrollOffsetX
Amount scrolled horizontally in PTs.
Scroll Offset Y
trigger.scrollOffsetY
Amount scrolled vertically in PTs.
Is Enabled
trigger.isEnabled
Whether the trigger is enabled or disabled.
Resources
Projects
Videos
Tutorials