bringapp
    Preparing search index...

    Function useElementDimensions

    • Custom hook to get the dimensions of a DOM element.

      Type Parameters

      • Element extends HTMLElement

        The type of the DOM element.

      Parameters

      • options: { height?: number; width?: number }

        The options for the hook.

        • Optionalheight?: number

          The initial height of the element (default: 0).

        • Optionalwidth?: number

          The initial width of the element (default: 0).

      Returns {
          elementDimensions: { height: number; width: number };
          ref: RefObject<null | Element>;
      }

      • An object containing the element dimensions and a ref to the element.