Interface ICursorHoverElementProps

Options for Cursor.attachHover.

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 (also receives sticky transforms when sticky is on)

emitter?: null | Element

Element that emits hover events. Defaults to element.

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

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

null
hoverDebounce?: number

Debounce for mouseenter before treating as hovered, in milliseconds.

16
padding?: string | number

Extra padding added to cursor width/height on hover. 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

Move the hovered element with the pointer (sticky parallax).

false

Max sticky offset. Number, CSS length, 'auto' (element size), or per-axis object.

'auto'
stickyFriction?: number

Pull-back friction while hovering. Higher values resist pointer offset more. Applied continuously toward the element's origin during hover.

0
stickyLerp?: number

Lerp factor for sticky motion. Defaults to the cursor lerp.

this.props.lerp
type?: string

Cursor type id to activate on hover (see Cursor.attachCursor)

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

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

null