Retrieves the module's callbacks instance.
Checks if the module has been destroyed.
Returns whether the preloader is currently hidden.
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.
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_destroyInternal method to handle the destruction of the module. It removes all callbacks, destroys properties, and cleans up event listeners and class names.
Retrieves the default mutable properties.
Retrieves the default static properties.
Protected_handleMethod that is called when the module's properties mutate. In most cases, used to handle callbacks.
Protected_onHandles the page load event, triggering when the page is fully loaded.
Destroys the module, cleaning up resources, callbacks, and event listeners.
Hides the preloader with a custom animation duration.
The duration of the hide animation (in milliseconds). Applies only when the container is used.
Optionalcallback: () => voidThe callback to execute when the hide animation is complete.
Returns an action destructor.
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.
Registers a callback for when the preloader is fully hidden.
The callback function to execute.
A destructor.
Registers a callback for when the preloader starts hiding.
The callback function to execute.
A destructor.
Page preloader component that manages the visibility and lifecycle of a loading screen. The module does not provide styling for the container.
Documentation