Event Handling
useOnLongHover
About
A hook to detect long hover on an element.
Examples
Basic example
Custom duration and mouse leave behavior
Arguments
| Argument value | Type | Description | Default | 
|---|---|---|---|
| callback | Function | Callback function to be called when long hover is detected | undefined | 
| options | Object | See table below | undefined | 
| Options value | Type | Description | Default | 
|---|---|---|---|
| duration | Number | The duration (in ms) after which long hover is detected | 500 | 
Returns
| Return value | Type | Description | Default | 
|---|---|---|---|
| ref | Callback Ref | A ref that can be used on the element you want to detect long hover on | undefined |