

Custom hook that tracks whether a DOM element is being hovered over.

## Usage [#usage]

```tsx
import { useHover } from "@tilt-legal/cubitt-components/utilities/hooks";

const buttonRef = useRef<HTMLButtonElement>(null);
const isHovered = useHover(buttonRef);
// Access the isHovered variable to determine if the button is being hovered over.
```

## API [#api]

### Signature [#signature]

```ts
declare function useHover<T extends HTMLElement = HTMLElement>(elementRef: RefObject<T>): boolean;
```

### Parameters [#parameters]

| Parameter    | Type                 | Description                                  | Default |
| ------------ | -------------------- | -------------------------------------------- | ------- |
| `elementRef` | `RefObject&lt;T&gt;` | The ref object for the DOM element to track. | -       |

### Return Value [#return-value]

| Value    | Type      | Description                                                           |
| -------- | --------- | --------------------------------------------------------------------- |
| `return` | `boolean` | A boolean value indicating whether the element is being hovered over. |
