Skip to content

windowDimen

windowDimen(): WindowDimens

Defined in: core/dom/geometry.ts:32

Returns the inner size of the window, in pixels.

This is window.innerWidth / window.innerHeight, so it includes any scrollbar. It reads window when called, never when imported.

WindowDimens

const { w, h } = windowDimen();