Hook useScreenBounds()
useScreenBounds(
__namedParameters: {avoidTaskbar:boolean; }): {ref:Ref<HTMLElement>;initiated:boolean;alignLeft:boolean;alignTop:boolean; }
Source: screen.ts
Returns the ideal orientation of an element so that it does not go outside of the screen.
Parameters
__namedParameters
avoidTaskbar
boolean = true
Whether to avoid the task bar.
Returns
ref
ref:
Ref<HTMLElement>
The React ref of the element.
initiated
initiated:
boolean
alignLeft
alignLeft:
boolean
Whether the element should align to the left (true) or right (false).
alignTop
alignTop:
boolean
Whether the element should align to the top (true) or bottom (false).