designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

Darkmode switcher

Open mimarz opened this issue 1 year ago • 2 comments

If we are going to define a darkmode for theme for our brands we also need to provide a component for users to decide how dark/light mode is applied.

We need to support manual toggle for dark/light mode aswell as automatic mode, which follows systems preferences for which mode should be active.

Its normal to use localstorage and media query prefers-color-scheme for this.

We should make this when we have a new dropdown menu component ready for this.

Notes:

  • https://dev.to/abbeyperini/an-accessible-dark-mode-toggle-in-react-aop
  • https://dev.to/stuffbreaker/dark-mode-in-web-components-is-about-to-get-awesome-4i14

Image

mimarz avatar Aug 24 '23 12:08 mimarz