interface HoverHandlers {
    whileHover?: VariantLabels | TargetAndTransition;
    onHoverEnd?(event, info): void;
    onHoverStart?(event, info): void;
}

Hierarchy (view full)

Properties

Properties or variant label to animate to while the hover gesture is recognised.

<motion.div whileHover={{ scale: 1.2 }} />

Methods

  • Callback function that fires when pointer stops hovering over the component.

    <motion.div onHoverEnd={() => console.log("Hover ends")} />
    

    Parameters

    Returns void

  • Callback function that fires when pointer starts hovering over the component.

    <motion.div onHoverStart={() => console.log('Hover starts')} />
    

    Parameters

    Returns void

Generated using TypeDoc