The Element.getBoundingClientRect() method returns a DOMRect object providing information about the size of an element and its position relative to the viewport.| MDN Web Docs