useFullscreen ​
Hook to handle fullscreen events
typescript
import { useFullscreen } from '@siberiacancode/reactuse';
Usage ​
typescript
const { enter, exit, toggle, value } = useFullscreen(ref);
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
target | Target | - | The target element for fullscreen |
options.initialValue? | boolean | false | initial value of fullscreen |
options.onEnter? | () => void | - | on enter fullscreen |
options.onExit? | () => void | - | on exit fullscreen |
Returns
Parameters
Name | Type | Default | Note |
---|---|---|---|
options.initialValue? | boolean | false | initial value of fullscreen |
options.onEnter? | () => void | - | on enter fullscreen |
options.onExit? | () => void | - | on exit fullscreen |