Skip to content

feat: implement light mode with theme toggle#5

Open
tarai-dl wants to merge 1 commit intobetter-feedback:mainfrom
tarai-dl:rn/feat-light-mode
Open

feat: implement light mode with theme toggle#5
tarai-dl wants to merge 1 commit intobetter-feedback:mainfrom
tarai-dl:rn/feat-light-mode

Conversation

@tarai-dl
Copy link
Copy Markdown

Closes #1

Changes

  • Added Tailwind darkMode: "class" strategy
  • Created ThemeProvider context with localStorage persistence and system preference detection
  • Added ThemeToggle button component with sun/moon icons in the header
  • Updated all components with light mode colors:
    • Layout: bg-gray-50 (light) / bg-zinc-900 (dark)
    • Header: bg-white (light) / bg-zinc-800 (dark)
    • Modal: bg-white (light) / bg-zinc-800 (dark)
    • Form inputs: proper contrast in both modes
    • Buttons: appropriate hover states for both modes
  • RainbowKit theme switches between lightTheme and darkTheme

How it works

  1. Theme context manages light/dark state
  2. On mount, checks localStorage for saved preference, falls back to prefers-color-scheme
  3. Toggles dark class on <html> element
  4. All Tailwind dark: prefix classes activate/deactivate accordingly
  5. RainbowKit wallet UI also switches themes

Screenshots

The toggle button appears in the header navigation with a sun icon (switching to light) or moon icon (switching to dark).

Closes better-feedback#1

- Added Tailwind dark mode class strategy
- Created ThemeContext with localStorage persistence
- Added ThemeToggle button component (sun/moon icons)
- Updated all components with light mode colors:
  - Layout: bg-gray-50 in light, bg-zinc-900 in dark
  - Header: bg-white in light, bg-zinc-800 in dark
  - Modal: bg-white in light, bg-zinc-800 in dark
  - Form inputs: proper contrast in both modes
  - Buttons: appropriate hover states for both modes
- RainbowKit theme switches between lightTheme and darkTheme
- Respects system preference (prefers-color-scheme)
- Persists user choice in localStorage
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

@tarai-dl is attempting to deploy a commit to the Kontext Team on Vercel.

A member of the Team first needs to authorize it.

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.

Feedback: Implement light mode

1 participant