Skip to content

feat: implement full dark mode support with next-themes#281

Open
brodapeethar wants to merge 2 commits into
Nexacore-Org:v2from
brodapeethar:feat/dark-mode
Open

feat: implement full dark mode support with next-themes#281
brodapeethar wants to merge 2 commits into
Nexacore-Org:v2from
brodapeethar:feat/dark-mode

Conversation

@brodapeethar

Copy link
Copy Markdown

Summary

Implements full dark mode support across the entire application using next-themes and Tailwind's dark: variant.

Changes

  1. Install and configure next-themes — Wraps the root layout with ThemeProvider using attribute="class", defaultTheme="system", and enableSystem for system preference detection.

  2. Theme toggle component (components/shared/theme-toggle.tsx) — Reusable toggle with two variants:

    • icon: Cycles through light → dark → system (compact, for nav bars)
    • full: Shows all three options as buttons (for settings pages)
    • Hydration-safe: renders a skeleton until mounted on client
  3. Theme toggle placement:

    • Landing page header (app/page.tsx)
    • Auth layout (top-right corner)
    • Dashboard layout (top bar)
    • Admin layout (top bar)
    • Settings page (full variant)
  4. Dark mode audit — Every page and component uses dark: Tailwind variants and semantic CSS variable tokens:

    • bg-background / text-foreground for page backgrounds
    • bg-card / text-card-foreground for cards
    • bg-muted / text-muted-foreground for muted elements
    • border-border / border-input for borders
    • bg-primary / text-primary-foreground for buttons
    • Error/not-found pages with dark:bg-zinc-900, dark:bg-zinc-800
    • Shared components (error-boundary, api-error-state)

Verification

  • npm run build passes with zero errors
  • npm run lint passes with zero errors

Pages covered

Landing, login, signup, OTP, forgot-password, reset-password, dashboard, transactions, profile, settings, notifications, admin dashboard, admin transactions, admin users, admin analytics, admin push notifications, error page, not-found page, all shared components.

Acceptance Criteria

  • Theme toggle is accessible in the topbar and on the landing page
  • All pages are fully readable and usable in dark mode
  • No white boxes, invisible text, or unreadable elements in dark mode
  • Theme preference persists across page refresh (handled by next-themes)
  • System theme preference is respected by default
  • npm run build and npm run lint pass

Closes #242

- Install and configure next-themes with attribute='class' for Tailwind dark mode
- Wrap root layout with ThemeProvider (defaultTheme='system', enableSystem)
- Create reusable ThemeToggle component with icon and full variants
- Add ThemeToggle to landing page header, auth layout, dashboard layout, admin layout, and settings page
- Audit all pages and components for dark mode:
  - Landing, auth (login, signup, OTP, forgot/reset password)
  - Dashboard, transactions, profile, settings, notifications
  - Admin overview, transactions, users, analytics, push notifications
  - Error page, not-found page, error-boundary, api-error-state
- Use Tailwind dark: variants with semantic color tokens
- Remove all hardcoded background/text colors in favor of CSS variables

Closes Nexacore-Org#242
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@brodapeethar is attempting to deploy a commit to the Emmanuel Dorcas' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@brodapeethar 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

@portableDD portableDD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@portableDD portableDD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please resolve conflicts, nice work

@brodapeethar

Copy link
Copy Markdown
Author

conflicts resolved

@portableDD

Copy link
Copy Markdown
Contributor

@brodapeethar sorry about this please resolve conflicts

@brodapeethar brodapeethar left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue resolved

@brodapeethar

Copy link
Copy Markdown
Author

resolved

@brodapeethar

Copy link
Copy Markdown
Author

pls check again i have resolved it all, thanks

@portableDD

Copy link
Copy Markdown
Contributor

This PR has merge conflicts. Please rebase on latest v2 and fix the conflicts.

3 similar comments
@portableDD

Copy link
Copy Markdown
Contributor

This PR has merge conflicts. Please rebase on latest v2 and fix the conflicts.

@portableDD

Copy link
Copy Markdown
Contributor

This PR has merge conflicts. Please rebase on latest v2 and fix the conflicts.

@portableDD

Copy link
Copy Markdown
Contributor

This PR has merge conflicts. Please rebase on latest v2 and fix the conflicts.

@portableDD

Copy link
Copy Markdown
Contributor

This PR has extensive merge conflicts with v2. Please rebase your branch on the latest v2 and resolve the conflicts so it can be merged.

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.

2 participants