Skip to content

isPrefersDarkTheme()

Checks whether the user prefers a dark color scheme.

Example:

ts
const prefersDark = isPrefersDarkTheme();

Released under the MIT License.