Skip to Content
🎉 Coral now has an MCP Server, check out the docs
DocumentationUtilsuseWindowWidth

useWindowWidth

A hook that returns the current window width in pixels.

Import

import { useWindowWidth } from '@octopus-energy/utils';

Usage

const windowWidth = useWindowWidth();

Returns

TypeDescriptionExample
numberThe pixel value of the current window width760
Last updated on