Skip to content

Add dark and light mode toggle with system preference detection #76

Description

@Akatenvictor

What

Implement theme switching between dark mode and light mode with automatic detection of system preference and persistent user selection.

Why

The current theme is static. Users expect theme control for visual comfort, especially for extended listening sessions. System preference detection provides a sensible default.

Scope

In: Theme toggle button, CSS custom properties for colors, system media query detection, localStorage persistence, smooth transition between themes
Out: Per-component theme overrides, custom color picker

Acceptance Criteria

  • Three states: light, dark, system (default)
  • Theme persists across sessions via localStorage
  • System preference changes detected via matchMedia
  • Theme switch animates with 200ms transition on background/color properties
  • No flash of wrong theme on page load (SSR compatible)

Technical Context

  • Extend globals.css with CSS custom properties for both themes
  • Add ThemeProvider in context/ that wraps the app
  • Store preference in localStorage key "theme-preference"

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions