Skip to content

getDarkMode

getDarkMode(allowAuto?): boolean

Defined in: theme.ts:100

Whether dark mode is currently active. Reactive — read it inside a scope to re-run on changes.

boolean = false

When true, returns undefined (rather than a boolean) if the user is following the OS preference, so a dark/light/auto control can tell the three states apart.

boolean