Optional
props: StaticProps & MutablePropsProtected
_activeActive slide index
Protected
_callbacksCallbacks instance
Protected
_destroyableStores actions that need to be executed when the module is destroyed
Protected
_domContainer size
Protected
_isTracks whether the module has been destroyed
Protected
_keyboardSnap keyboard
Protected
_propsCurrent properties
Protected
_rafAnimation frame for smooth animations
Protected
_resizeResize handler
Protected
_slidesAll slides
Protected
_swipeSwipe events
Protected
Optional
_timelineTimeline for smooth transitions
Protected
_trackSnap Track
Protected
_wheelWheel events
Active slide index
Active slide
Get axis name depending on direction
Retrieves the module's callbacks instance.
Get container
Container size depending on direction (width or height)
Checks if the module has been destroyed.
If transition in progress
Protected
magnetGet nearest magnet
Protected
magnetsGet slide magnets
The name of the module, derived from the class name
Optional prefix for classnames used by the module
Current properties. Do not mutate these directly, use updateProps
instead.
All slides
Snap track
Protected
_addAdds a class name on an element, and keeps track of it for removal when the module is destroyed.
The target DOM element.
The class name to toggle.
Protected
_cnHelper function to generate classnames with the module's prefix.
The class names to generate.
A string of class names with the module's prefix applied.
Protected
_destroyDestroys the component and clears all timeouts and resources.
Protected
_fetchUpdate slides list and attach them
Retrieves the default mutable properties.
Retrieves the default static properties.
Protected
_handleHandles properties change
Protected
_handleHandle RAF update, interpolate track values
Protected
_handleResize the scene and reflow
Protected
_reflowReflow: update static values of slides
Protected
_renderRender slides logic
Protected
_updateUpdate slides values
Protected
_updateUpdate slides progress
Cancel sticky behavior
Destroys the module, cleaning up resources, callbacks, and event listeners.
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.
Adds a callback on the module's destruction.
The function to execute during destruction.
Request resize (handled with debounce timeout)
Stick to the nearest magnet
Snap/Carousel handler. This class manages sliding progress with options like swipe, wheel interactions, and smooth transitions.
Please not that the class does not apply any styles to the slides, it only handles the logic.
Documentation