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-color
meta 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:
ModeWatcher
component (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 here. Navigate to an article, then pick the Feature on menu button