use-detect-keyboard-open
use-detect-keyboard-open copied to clipboard
Triggered when you reduce the window on PC
Tested on MacOS and Ubuntu. I have component:
export function _Menu() {
const isKeyboardOpen = useDetectKeyboardOpen()
return (
<div style={isKeyboardOpen ? { display: 'none' } : {}}>
// ...
</div>
)
}
result: screen record 16.05.2023 13:14:14.webm screen record 16.05.2023 13:17:05.webm