Optionalprops: IMarqueeStaticProps & IMarqueeMutableProps & Partial<OptionalonCallbacks: Partial<Retrieves the module's callbacks instance.
The current marquee coordinate.
Checks if the module has been destroyed.
Check if the marquee is vertical
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.
Total size of all elements in the marquee (width or height depending on direction)
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 instance and cleans up resources
Get default mutable properties.
When need to use dynamic FPS factor to adjust the speed of the marquee.
Centers the marquee content within the container.
Enables or disables the marquee animation.
When false, the marquee will be paused.
The gap between the marquee elements. Supports css units like px, rem, vw, vh, svh.
Pauses the marquee when the mouse hovers over it.
Pauses the marquee when the element leaves the viewport.
The speed of the marquee animation. Supports css units like px, rem, vw, vh, svh.
Get default static properties.
Indicates whether to clone the marquee nodes. Can be set to false if DOM cloning is not preferred.
The container element that holds the marquee content.
Indicates the direction of the marquee animation.
Determines whether to apply the will-change CSS property to the marquee elements to optimize rendering.
Setting this to true may improve performance.
The debounce delay for the resize event in milliseconds.
Protected_handleProtected_setSet marquee events
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.
Renders the marquee, adjusting element positions.
Optionalstep: numberResizes the marquee, recalculating element positions and cloning if necessary.
A custom marquee component that smoothly scrolls its child elements.
This component is designed to loop elements horizontally within a container, with support for customization such as speed, gap, pause on hover, and more.
Documentation