Skip to main content
sunpeak API

Overview

The useIsMobile hook detects if the current viewport width is below the mobile breakpoint (768px).

Import

Signature

Returns

return
boolean
true if viewport width is less than 768px, false otherwise.

Usage