Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

React useScreen Hook

React useScreen hook for accessing window.screen properties. Device dimensions, color depth, orientation. SSR safe.

Access the full Screen API in React with useScreen. Returns the window.screen object with all device display properties that update on resize. Get physical screen dimensions, available workspace size, color depth, pixel depth, and screen orientation. Optional debounce delay for resize events. Returns undefined during SSR and optionally until client hydration. Provides stable screen object reference with all standard Screen interface properties. Perfect for responsive design decisions, device capability detection, orientation-aware layouts, or display quality checks. Works with Next.js App Router.

React useScreen Hook preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.