Skip to content

useIsMobile

Reports whether the viewport is below the mobile breakpoint.

useIsMobile tells you if the viewport is less than 768px. It uses matchMedia, so it reacts instantly to browser zoom and device rotation, not just window resizing.

Installation

Usage

Example