useElementInfo
Usage
Element Information :
Component Name=<>
hovered="false"
Attributes:
Rect Information:
Window Size:
Width="0", Height="0"
Scroll Positions:
Scroll Position (Element)="0"
Scroll Position (Body)="0"
API References
Necessary to define a ref
on the related element to pass getBoundingClientRect()
.
The rect
returned value is a DOMRect object which is the smallest rectangle which contains the entire element, including its padding and border-width.
windowSize returns the interior width and height of the window in pixels (that is, the width and height of the window's layout viewport). The read-only innerWidth and innerHeight property of the Window interface returns the interior height of the window in pixels, that includes the width of the vertical scroll bar, if one is present and the height of the horizontal scroll bar, if present.