//vite-plugin-dark-modebykevinmarrec

vite-plugin-dark-mode

Vite plugin to set initial color scheme based on user preferences

1
0
1
1
TypeScript

@kevinmarrec/vite-plugin-dark-mode

Description

Vite plugin to inject a script to set initial color scheme based on user preferences.

Meant to be used with VueUse to toggle the dark mode.

Opinions

  • Use dark as the class name for the dark mode.

  • Use prefers-color-scheme CSS media feature to get operating system (or user agent) preferences.

  • Use vueuse-color-scheme local storage key to get user preferences.

[beta]v0.14.0