use-show-window-size

React hook that overlays the current viewport size in a corner. Look at the small badge showing the size — try resizing this window or your dev tools panel.

Position

Choose which corner the badge attaches to.

Disable

Toggle disable. Useful for process.env.NODE_ENV === "production".

Return value

The hook also returns the current size as { width, height } for programmatic use.

0px × 0px
GitHub →