A hook to detect long press on an element.
Argument value | Type | Description | Defualt |
---|---|---|---|
callback | Function | Callback function to be called when long press is detected | undefined |
options | Object | See table below | undefined |
Options value | Type | Description | Default |
---|---|---|---|
duration | Number | The duration (in ms) after which long press is detected | 300 |
onClick | Function | Fires on click | undefined |
Return value | Type | Description | Defualt |
---|---|---|---|
ref | Callback Ref | A ref that can be used on the element you want to detect long press on | undefined |
Join our discord server! You can click the floating discord icon at the bottom right of the screen and chat with us!