7.15.1
Search
Ctrl + K
theming
styles
guides
mantine hooks
UI and Dom
State management
Utilities
Lifecycle
mantine form
mantine core
mantine dates
mantine charts
extensions
changelog
Detects if given element is hovered
Import
import { useHover } from '@mantine/hooks';
Source
Docs
Package
Put mouse over me please
import { useHover } from '@mantine/hooks'; function Demo() { const { hovered, ref } = useHover(); return ( <div ref={ref}> {hovered ? 'I am hovered' : 'Put mouse over me please'} </div> ); }
function useHover<T extends HTMLElement = HTMLDivElement>(): { ref: React.RefObject<T>; hovered: boolean; };
Previous
use-hotkeys
Next
use-in-viewport
Build fully functional accessible web applications faster than ever
About
Community
Project
Built by Vitaly Rtishchev and these awesome people