Appearance
usePreferredDark
Reactive prefers-color-scheme: dark media query
Demo
Usage
tsx
import { usePreferredDark } from '@reause/core'
const isDark = usePreferredDark() // boolean
// `true` while the user prefers a dark theme, flips live with the OS settingType Declarations
ts
export function usePreferredDark(options?: ConfigurableWindow): boolean