Bootstrap

API matchMedia

createMatchMedia

function

createMatchMedia(query): ReadableSignal<boolean>

Create a store tracking the state of a matchMedia query.

Parameters

query: string

the query to match

Returns

ReadableSignal<boolean>

a readable store tracking the match media query state