Retrieves the module's callbacks instance.
Progress while the section is entering the root.
Indicates whether the instance has been destroyed.
After destruction, destroy is a no-op.
Whether the section is currently considered visible (optimized mode).
Progress while the section moves through the root (pin-like range).
The name of the module, derived from the class name
Progress while the section is leaving the root.
Optional prefix for classnames used by the module
Full travel progress from entering to fully leaving the root.
Current properties. Do not mutate these directly, use updateProps instead.
Root bounds used for progress math (viewport or root element).
Section element whose progress is tracked.
Section bounds relative to rootBounds.
Protected_addAdds prefixed classes to an element and removes them on destroy.
Skips classes that are already present on the element.
Target DOM element.
Unprefixed class name segments.
Protected_cnBuilds one or more prefixed class names.
Unprefixed class name segments.
Space-separated prefixed class string.
Protected_destroyInternal method to handle the destruction of the module. It removes all callbacks, destroys properties, and cleans up event listeners and class names.
Protected_emitEmits a callback event with a fixed payload.
Set default mutable props
Get default static props
If true, progress is calculated only while the section is within the viewport or the root element.
Improves performance by avoiding unnecessary calculations.
The root element used as a reference for scroll progress calculation.
Usually it is the scroll container.
If null, the viewport is used as the reference.
The element whose scroll progress is tracked.
If true, the scroll progress is calculated based on the small viewport height (svh in css) instead of the current viewport height (vh in css).
Protected_handleMethod that is called when the module's properties mutate. In most cases, used to handle callbacks.
Progress of the section's top/left corner between the given thresholds.
Y start threshold.
X end threshold.
Y end threshold.
X start threshold.
Progress along x and y.
Adds a custom callback to the module.
The event type to listen for (e.g., 'props', 'destroy').
The function to execute when the event is triggered.
Additional settings for the callback.
Registers a function to run when the instance is destroyed.
If the instance is already destroyed, action runs immediately.
Cleanup function (for example remove listeners or DOM classes).
Refreshes root/section bounds and emits update.
When true, updates even if the section is not visible.
Change module's mutable properties
Tracks scroll progress of a section relative to the viewport or a scroll root.
updateon scroll (and optionally only while the section is visible)inProgress,outProgress,moveProgress, andprogressrootand optionaluseSvhheightDocumentation