7.0.0-beta.7
Search
Ctrl + K
theming
styles
guides
mantine hooks
UI and Dom
State management
Utilities
Lifecycle
mantine form
mantine core
mantine dates
other packages
changelog
Detects if 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.MutableRefObject<T>; hovered: boolean; };
Previous
use-hotkeys
Next
use-intersection
Build fully functional accessible web applications faster than ever
About
Community
Project
Built by Vitaly Rtishchev and these awesome people