Skip to content

🎨 theme: Add dark mode#97

Open
Paul2803k wants to merge 1 commit intodevelopmentfrom
feature/62-implement-a-dark-theme-with-system-detection
Open

🎨 theme: Add dark mode#97
Paul2803k wants to merge 1 commit intodevelopmentfrom
feature/62-implement-a-dark-theme-with-system-detection

Conversation

@Paul2803k
Copy link
Collaborator

@Paul2803k Paul2803k commented Feb 10, 2026

Description

In this PR, we create a first draft of the dark theme, together with the support system to switch themes.

Implementation

There are two main components for the implementation:

  • the ThemeModeProvider: is the component responsible for managing which "mode" has been selected. Currently we have auto, dark and light mode and we select auto by default. The auto mode picks up the browser theme and matches it with the other 2 modes. For now the theme is saved in the browser local storage.
  • the ThemedApp is the consumer that gets the resolved theme and injects it in the styled-componets ThemProvider.

Finally we modified some components to make use of the theme colors.

@Paul2803k Paul2803k linked an issue Feb 10, 2026 that may be closed by this pull request
import type { ThemeModeContextValue } from "./ThemeModeProvider";

/** Context and hook for managing theme mode (auto/light/dark) and system preference. */
export const ThemeModeCtx = createContext<ThemeModeContextValue | undefined>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

📝to the reviewer: these functions are exported here instead that in the ThemeModeProvider because Vite does not like exporting mixed elements (such as functions and components) in the same file. We do this in other parts of the project.

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.

🎨 theme: Implement a Dark theme with system detection

1 participant