usePreferredDark

Reactive dark theme preference.

Usage

<script>
  import { usePreferredDark } from '@svelte-use/core'

  const isDark = usePreferredDark()
</script>

<p>{$isDark}</p>

Type Declarations

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

Source

SourceDemoDocs