Skip to main content

Interface: UseMediaQueryOptions

Defined in: use-media-query.ts:6

Options for useMediaQuery.

Properties​

defaultValue?​

optional defaultValue?: boolean

Defined in: use-media-query.ts:12

Value returned on the server, during hydration, and whenever window.matchMedia is unavailable. Defaults to false.


onChange?​

optional onChange?: (matches) => void

Defined in: use-media-query.ts:14

Called with the new match state whenever it changes (not on mount).

Parameters​

matches​

boolean

Returns​

void