Home
Docs
InfinityFX
©Copyright2016-2026 InfinityFX. All rights reserved.
InfinityFX®
Lively
v5.0.0
Getting started
Components
Animate
LayoutGroup
TextAnimation
ViewAnimation
Hooks
useAudio
useHover
useLink
useReducedMotion
useScroll
useSpring
useTap
useViewport
useVisible
Links
v4 docs
llms.txt

useHover

Provides a ref and a reactive boolean state indicating whether the attached element is currently being hovered over by a pointer.

Importing

1
import { useHover } from '@infinityfx/lively/hooks';

Usage

Hover me

Call signature

1
const [ref, hovering] = useHover<T extends HTMLElement>()

Returns

ref:React.RefObject<T | null>

A React ref to attach to the target DOM element.

hovering:boolean

A boolean value indicating if the element is currently hovered.