Skip to content

feat: implement dark mode toggle (#31) - #173

Open
lb1192176991-lab wants to merge 1 commit into
sorosave-protocol:mainfrom
lb1192176991-lab:feat/dark-mode-toggle-31
Open

feat: implement dark mode toggle (#31)#173
lb1192176991-lab wants to merge 1 commit into
sorosave-protocol:mainfrom
lb1192176991-lab:feat/dark-mode-toggle-31

Conversation

@lb1192176991-lab

Copy link
Copy Markdown

What

Adds a full dark mode implementation to the SoroSave frontend with a user-toggleable switch.

Changes:

  • ThemeProvider — React context that manages dark/light state, persists preference in localStorage, respects system prefers-color-scheme
  • Theme toggle button — Moon/sun icon in the navbar toggles between light/dark
  • Tailwind dark mode — switched from media-query to class-based (darkMode: 'class')
  • Dark variants — added dark: Tailwind classes to every component (Navbar, Home, Groups, GroupCard, MemberList, RoundProgress, CreateGroupForm, ContributeModal, ConnectWallet)
  • Global CSS — replaced media-query dark scheme with Tailwind dark: classes on body

Why

Users working with the platform at night or in low-light environments benefit from a dark theme. This improves accessibility and user experience without requiring OS-level theme changes.

Testing

  • Verified theme toggle works in browser
  • Preference persists across page refreshes (localStorage)
  • System dark mode is respected on first visit
  • All pages and components render correctly in both themes
  • No flash of unstyled dark mode (suppressHydrationWarning on <html>)

- Add ThemeProvider context with localStorage persistence
- Add dark mode toggle button to Navbar (moon/sun icons)
- Update tailwind.config.js with darkMode: 'class'
- Replace media-query dark mode with Tailwind dark: variants
- Add dark mode styling across all components

Closes sorosave-protocol#31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant