Prefers Dark:
false

usePreferredDark

Reactive dark theme preference.

Usage

import { usePreferredDark } from '@vueuse/core'

const isDark = usePreferredDark()

Component

<UsePreferredDark v-slot="{ prefersDark }">
  Prefers Dark: {{ prefersDark }}
</UsePreferredDark>
Learn more about component usage

Type Declarations

/**
 * Reactive dark theme preference.
 *
 * @see https://vueuse.org/usePreferredDark
 * @param [options]
 */
export declare function usePreferredDark(
  options?: ConfigurableWindow
): Ref<boolean>

Source

SourceDemoDocs