Optionalprops: TModuleProps<Retrieves the module's callbacks instance.
Smoothed coordinates including width/height.
DOM parent for the cursor node (body when container is window).
Topmost active hover target, if any.
Indicates whether the instance has been destroyed.
After destruction, destroy is a no-op.
The name of the module, derived from the class name
SVG path element for path behavior (not necessarily mounted).
Optional prefix for classnames used by the module
Current properties. Do not mutate these directly, use updateProps instead.
Target coordinates (hover dimensions applied, no smoothing).
Protected_addAdds prefixed classes to an element and removes them on destroy.
Skips classes that are already present on the element.
Target DOM element.
Unprefixed class name segments.
Protected_cnBuilds one or more prefixed class names.
Unprefixed class name segments.
Space-separated prefixed class string.
Protected_destroyInternal method to handle the destruction of the module. It removes all callbacks, destroys properties, and cleans up event listeners and class names.
Protected_emitEmits a callback event with a fixed payload.
Set default mutable props
Stops rendering the cursor automatically when its coordinates and size closely match the target values.
Enables or disables the custom cursor interactions.
The initial height of the custom cursor.
Supports css units like px, rem, vw, vh, svh.
Linear interpolation factor for smooth cursor movement.
The value must be between 0 and 1, with higher values indicating faster movement.
The initial width of the custom cursor.
Supports css units like px, rem, vw, vh, svh.
Get default static props
Appends the custom cursor to the container. Use false if you need only cursor logic and interactions.
Cursor behavior
The container where the custom cursor is active.
Use window for full-window activation.
Hides the native cursor if set to true.
Modifier for the cursor transform.
Protected_handleMethod that is called when the module's properties mutate. In most cases, used to handle callbacks.
Registers a typed cursor element and appends it to inner.
Registers a hover target that can resize, snap, or sticky-move the cursor.
Destructor that detaches listeners for this target
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.
Registers a function to run when the instance is destroyed.
If the instance is already destroyed, action runs immediately.
Cleanup function (for example remove listeners or DOM classes).
Advances interpolation and writes transforms.
Custom cursor with smooth motion, hover sizing, sticky elements, and typed variants.
behavior: 'path')Documentation