use-click-coordinates
The usesClickCoordinates hook is for capturing click coordinates, this is useful when positioning a tooptip or creating visual effects
Module
import { useClickCoordinates } from "@atomico/hooks/use-click-coordinates";Syntax
useClickCoordinates(ref, handlerClick);Coordinates
interface Coordinates {
x: number;
y: number;
offset: {
x: number;
y: number;
};
}Example
Last updated
Was this helpful?
