@bodil/dom
    Preparing search index...

    Function mediaQuery

    • Get a signal which reflects the current state of a media query.

      For instance, mediaQuery("(prefers-color-scheme: dark)") detects whether the user has requested dark mode, and updates itself when the user switches between light and dark mode.

      Parameters

      • query: string

      Returns Computed<boolean>