Skip to content

feat(frontend): add dark mode toggle with theme-aware styling (#235) - #356

Merged
MissBlue00 merged 2 commits into
MissBlue00:mainfrom
sagesan2580:issue-235-dark-mode-toggle
Jul 29, 2026
Merged

feat(frontend): add dark mode toggle with theme-aware styling (#235)#356
MissBlue00 merged 2 commits into
MissBlue00:mainfrom
sagesan2580:issue-235-dark-mode-toggle

Conversation

@sagesan2580

@sagesan2580 sagesan2580 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds full dark mode support to the frontend with a sun/moon toggle button.

Changes

Infrastructure

  • Added ThemeProvider (next-themes) to root layout with attribute="class", defaultTheme="system", enableSystem
  • Added suppressHydrationWarning to <html> to prevent SSR mismatch
  • Added missing --input-background and --switch-background CSS vars to .dark block

New Component

  • ThemeToggle (src/app/components/theme-toggle.tsx) — hydration-safe sun/moon button that toggles between light/dark

Toggle Placement

  • Desktop sidebar: In the logo header area, next to "StellarPay Rails"
  • Mobile navbar: In the top bar, between the title and hamburger menu

Theme-Aware Conversion (22 files)

All dashboard pages converted from hardcoded dark colors to semantic CSS variables:

Old (hardcoded) New (theme-aware)
bg-black bg-background
text-white text-foreground
text-neutral-400/500 text-muted-foreground
bg-gradient-to-br from-white/[0.03] to-transparent bg-card
border-white/5 border-border / border-sidebar-border
bg-white/10 (active nav) bg-accent text-accent-foreground
bg-white/5 (icons) bg-muted
bg-white text-black (buttons) bg-primary text-primary-foreground
bg-black/80 (overlay) bg-background/80

Persistence

  • User preference saved to localStorage automatically by next-themes
  • Respects OS preference via enableSystem + defaultTheme="system"

closes: #235

…ue00#235)

- Add ThemeProvider (next-themes) to root layout with system default
- Create ThemeToggle (sun/moon) component with hydration-safe rendering
- Add toggle button to sidebar header and mobile navbar
- Add missing --input-background and --switch-background to .dark CSS
- Convert all 22 dashboard pages from hardcoded dark colors to theme-aware
  CSS variables (bg-background, text-foreground, bg-card, border-border,
  text-muted-foreground, bg-sidebar, etc.)
- Use semantic tokens: bg-accent for active states, bg-muted for icon
  containers, bg-card for cards, border-border for borders
- Preserve all semantic status colors (green/red/yellow/blue)
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@sagesan2580 is attempting to deploy a commit to the missblue00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@sagesan2580 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@MissBlue00
MissBlue00 merged commit b9ead67 into MissBlue00:main Jul 29, 2026
0 of 4 checks passed
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.

Add dark mode toggle to frontend

2 participants