@ducor/hooks
Version:
A collection of useful React hooks for building modern web applications. Includes hooks for clipboard operations, window events, intervals, timeouts, and more.
16 lines (15 loc) • 476 B
TypeScript
import { RefObject } from "react";
interface useHoverProps {
ref?: RefObject<HTMLElement | null>;
disabled?: boolean;
}
/**
* `useHover` is a custom hook that detects whether the pointer has moved over or away from an element.
*
* @see Docs https://ui.ducor.net/hooks/use-hover
*/
declare const useHover: <T extends HTMLElement = HTMLDivElement>(props?: useHoverProps) => {
ref: RefObject<HTMLElement | null>;
hovered: boolean;
};
export default useHover;