Menu
Libraries |
Category

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

Comments