- useElementSize<T, Size>(options?): {
elementRef: RefObject<T>;
size: Size;
} Type Parameters
- T extends HTMLElement
- Size extends ISize = ISize
Parameters
- options: Partial<IParams<Size>> = {}
Returns {
elementRef: RefObject<T>;
size: Size;
}
- An object containing a ref to the element and the current size.
Calculates the size of an HTML element and updates it when it changes.