Skip to content

Implement Dark Mode Toggle #3

@RUKAYAT-CODER

Description

@RUKAYAT-CODER

Overview

Add dark mode support to the TeachLink platform with a toggle in the header for user preference.

Background
Many users prefer dark mode for reduced eye strain, especially during night-time study sessions. We need to implement a complete dark mode theme and allow users to toggle between light and dark modes.

Specifications

Features:
Dark mode theme using Tailwind's dark mode
Persistent user preference (localStorage)
Automatic detection of system preference as default

Packages to Install:

npm install next-themes

Tasks:
Configure Tailwind for dark mode
Create a ThemeProvider to manage theme state
Add a toggle button to the Header component
Ensure all components support dark mode styling
Save user preferences to localStorage
Impacted Files:
src/components/layout/Header.tsx
src/components/ui/theme-toggle.tsx (new)
src/lib/theme-provider.tsx (new)
tailwind.config.ts
Labels:
UI, theme, accessibility, priority-high

Contribution Guidelines:
Assignment required before PR submission
Timeframe: 2 days
PR description must include: Close #3
Join the Telegram group
Star the repo
For more context, please refer to the project README here 🚀.

Acceptance Criteria:
Dark mode toggle appears in the header
Theme changes when toggle is clicked
All UI components render correctly in both themes
Theme preference persists between sessions
System preference is respected by default

Figma Link

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions