Skip to content

Add support for dark mode #10

@MartinBspheroid

Description

@MartinBspheroid

Adjust the fallback color to render elements in both light and dark mode, eg. If the rendering Color for Widget is not defined, fall back to black or white (depending on the mode).
Nowadays, light/dark mode is detected by the browser so we can use the media query to detect the mode and set the theme accordingly from get-go during the initial render.
Provide a hook (e.g., useTheme) that allows users to toggle between light and dark themes. This hook can also store the user's preference in localStorage or cookies.

Ideas/Features:

  • Add support for custom light/dark color fallbacks.
  • Detect system theme and set theme accordingly.
  • Provide a useTheme hook for switching between light and dark modes when user preference is not set or user has set a preference.
  • Support saving user preference in localStorage or cookies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DOMDOM backend relatedfeatureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions