Skip to Content
🎉 Coral x Panda has been released 🎉 Read the Migration Guide
DocumentationUtilsuseWindowWidth

useWindowWidth

A hook that returns the current window width in pixels.

Import

import { useWindowWidth } from '@krakentech/utils';

Usage

const windowWidth = useWindowWidth();

Returns

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