Interface ICursorHoverElementProps

Information about the currently hovered element affecting cursor behavior.

interface ICursorHoverElementProps {
    element: Element;
    emitter?: null | Element;
    height?: null | number | string & {} | "auto";
    hoverDebounce?: number;
    padding?: string | number;
    snap?: boolean;
    sticky?: boolean;
    stickyAmplitude?:
        | TCursorHoverElementStickyAmplitude
        | TCursorHoverElementStickyAmplitudeObject;
    stickyFriction?: number;
    stickyLerp?: number;
    type?: string;
    width?: null
    | number
    | string & {}
    | "auto";
}

Properties

element: Element

Hoverable DOM element

emitter?: null | Element

Hover events emitter. If not provided, the element itself will be used

null
height?: null | number | string & {} | "auto"

Target cursor height on hover. Supports css units like px, rem, vw, vh, svh.

null
hoverDebounce?: number

Debounce time for hover events, in milliseconds

16
padding?: string | number

Padding applied around the cursor. Supports css units like px, rem, vw, vh, svh.

0
snap?: boolean

Snap cursor to the element center. Does not work with behavior: "path".

false
sticky?: boolean

Enable sticky behavior for the hovered element.

false
stickyAmplitude?:
    | TCursorHoverElementStickyAmplitude
    | TCursorHoverElementStickyAmplitudeObject

Sticky animation amplitude. Supports css units like px, rem, vw, vh, svh.

'auto'
stickyFriction?: number

Friction factor for smooth sticky animation. Friction is applied during hover and will tend the element to its original position. The higher value the more resistance is applied.

0
stickyLerp?: number

Linear interpolation factor for smooth sticky animation.

this.props.lerp
type?: string

Cursor type to activate on hover

width?: null | number | string & {} | "auto"

Target cursor width on hover. Supports css units like px, rem, vw, vh, svh.

null