WordPress.org

The Viewport Data Edit

Selectors Selectors

isViewportMatch isViewportMatch

Returns true if the viewport matches the given query, or false otherwise.

Parameters

  • state: Viewport state object.
  • query: Query string. Includes operator and breakpoint name,
    space separated. Operator defaults to >=.

Top ↑

Actions Actions

Top ↑

setIsMatching setIsMatching

Returns an action object used in signalling that viewport queries have been
updated. Values are specified as an object of breakpoint query keys where
value represents whether query matches.

Parameters

  • values: Breakpoint query matches.
Skip to toolbar