Optional
initialProps: StaticProps & ChangeablePropsReturns the preloader container element.
Returns the list of custom resources to be preloaded.
Returns the list of images to be preloaded.
Checks if the module has been destroyed.
Returns whether the preloader is hidden.
Checks if the module has been initialized.
The current loading progress as a fraction between 0 and 1.
Returns the number of resources that have been successfully loaded.
The name of the module, derived from the class name
Optional prefix for class names used by the module
Returns the current preloader progress value.
Sets the preloader's progress value and triggers progress change handling.
The current properties of the module, which include both static and changeable properties. These can be retrieved dynamically during the module's lifecycle.
Returns the total number of resources to be preloaded, accounting for user-defined resources and automatic resources.
Returns the list of videos to be preloaded.
Adds a custom callback to the module.
Adds a DOM event listener that will be automatically removed when the module is destroyed.
The target element for the event listener.
The event type to listen for (e.g., 'click', 'resize').
The callback function to execute when the event is triggered.
Optional
options: boolean | AddEventListenerOptionsAdditional options for the event listener.
Adds a plugin to the component. The plugin is initialized upon being added,
and the plugin's component
property is set to the current component instance.
An instance of the Plugin class to be added.
Adds responsive property rules to the module. This must be done before initialization.
The responsive property rules to be added.
Adds a viewport callback that will be automatically removed when the module is destroyed.
The viewport target (e.g., width or height).
The callback function to execute when the viewport target changes.
Additional data for the callback.
Hides the preloader with an optional animation duration.
The duration of the hide animation (in milliseconds).
Registers a callback for when the preloader is fully hidden.
The callback function to execute.
A cancelable action or undefined if already hidden.
Registers a callback for when the preloader starts hiding.
The callback function to execute.
A cancelable action or undefined if already in hiding process.
Page preloader that calculates the loading progress of page resources such as images, videos, and custom elements. Provides smooth progress calculation using an animation frame and optionally a timeline for forced completion.
Requires
Requires styles:
@import '~vevet/lib/styles/components/Preloader';
Link
See examples https://antonbobrov.github.io/vevet-demo/progress-preloader/
Link
See docs https://antonbobrov.github.io/vevet/classes/ProgressPreloader.html