mode-watcher
- Purpose: Provides utilities to manage light & dark mode in SvelteKit applications.
- Key Features:
- Automatically detects and applies user/OS preferences for light/dark mode.
- Manages
theme-colormeta tag. - Supports toggling, setting, and resetting modes programmatically.
- Target Audience: SvelteKit developers needing light/dark mode management.
- Svelte Support: Designed specifically for SvelteKit.
- Core API:
ModeWatchercomponent (handles automatic mode detection).- Functions:
toggleMode,setMode,resetMode. - Stores:
mode,userPrefersMode,systemPrefersMode.
- Demo: Available on StackBlitz ↗.
- Community: Discord server ↗ for support and collaboration.
dark-modedarkmodelight-modesveltesveltekittheme-switchertheme-togglethemeswitchsvelte-themes
Featured Stories
No featured articles.