Optional
initialProps: StaticProps & ChangeablePropsThe cursor container.
Returns the DOM parent for the cursor element.
The currently hovered element. Stores information about the element that the cursor is currently interacting with.
The inner element of the custom cursor. This element is nested inside the outer element and can provide additional styling.
Checks if all coordinates are interpolated.
True if all coordinates are interpolated, false otherwise.
Checks if the module has been destroyed.
Checks if the module has been initialized.
The name of the module, derived from the class name
The outer element of the custom cursor. This is the visual element that represents the cursor on screen.
Optional prefix for class names used by the module
The current properties of the module, which include both static and changeable properties. These can be retrieved dynamically during the module's lifecycle.
Target coordinates of the cursor for interpolation.
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.
Sets hover events on an element.
The settings for the hovered element.
Optional
enterTimeout: number = 100The timeout before the hover effect is applied.
An object containing a remove method to unregister the hover events.
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.
Creates a smooth custom cursor that replaces the native cursor and follows mouse movements with smoothing and animations. The cursor's appearance and behavior can be customized, and it supports interacting with hoverable elements.
Requires
Requires styles:
@import '~vevet/lib/styles/components/CustomCursor';
Link
See examples https://antonbobrov.github.io/vevet-demo/custom-cursor/
Link
See docs https://antonbobrov.github.io/vevet/classes/CustomCursor.html