LabTechUDF / LabTechUDF/interfaces-usuario
Theme: DARK MODE
Open
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
📄 Description
Add a dark mode feature to the React application, allowing users to switch between light and dark themes. The toggle should be a floating button anchored in the bottom-right corner of the viewport, following the design provided in Figma.
Figma Design:
https://www.figma.com/design/A5jKxrxuTpR5rufFCMKUFN/UDF-Room-and-Events-management?node-id=0-1&p=f&t=T29iPOCbTRecYCid-0
🎯 User Acceptance Criteria
-
Toggle Visibility & Placement
- A floating theme-toggle button appears in the bottom-right corner of every page.
- The button’s appearance (icon, size, hover/focus states) matches the Figma specification.
-
Theme Switching
- Clicking the toggle switches between light and dark themes in real time.
- All existing UI components (backgrounds, text, cards, buttons, etc.) update their styles based on the selected theme.
-
State Management
- The theme state is managed via a
ThemeContextimplemented with React’suseContexthook. - Components consume the current theme through
useContext(ThemeContext)rather than prop-drilling.
- The theme state is managed via a
-
Persistence
- The user’s theme preference is saved to
localStorageand reapplied on page reload. - If no preference exists, default to the user’s OS‐level color scheme (
prefers-color-schememedia query).
- The user’s theme preference is saved to
-
Accessibility
- The toggle button includes an accessible
aria-labelthat reflects the current action (e.g., “Switch to dark mode” or “Switch to light mode”). - Keyboard users can focus and activate the toggle (e.g., via Tab + Enter/Space).
- The toggle button includes an accessible
✅ Task Checklist
- Create
ThemeContextandThemeProvider. - Wrap the root of the app with
<ThemeProvider>. - Implement
ThemeToggleButtoncomponent and place it in the main layout. - Define light/dark theme variables and apply them globally.
- Ensure components read theme via
useContext(ThemeContext)and adapt styles. - Persist preference in
localStorageand respect OS default on first load. - Add
aria-labeland keyboard support to the toggle. - Review against Figma design for visual consistency.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.