Calculates the size of an HTML element and updates it when it changes.

  • Type Parameters

    • T extends HTMLElement

      The type of the HTML element.

    • Size extends ISize = ISize

      The interface defining the size object type.

    Parameters

    • Optionaloptions: Partial<IParams<Size>>

      The optional parameters for the useElementSize function.

    Returns { elementRef: any; size: Size }

    • An object containing a ref to the element and the current size.