question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Simpler setup for dark mode

See original GitHub issue

Usage example, including component/hook API

A more abstracted / built in feature to handle colorScheme (mainly light/dark mode). It would improve DX, speed and types. You now need to add the right useState type yoruself const [colorScheme, setColorScheme] = useState<ColorScheme>("dark"); for TS to not complain, which could be hard to figure out for beginners (docs doesn’t mention it afaik).

Also maybe it could handle the localStorage value out of the box as well. (Look to Chakra UI for inspiration).

Example API:

  const { colorMode, toggleColorMode } = useColorMode()

And automatically include the colorMode in the MantineProvider

Possible implementation – describe how the feature can be implemented

Maybe copy most of the setup code in docs to a hook provided by mantine

Do you want to contribute this feature and create a pull request

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rtivitalcommented, Dec 23, 2021

No, thanks, it’s a core feature and I need to give it some thought

0reactions
rtivitalcommented, Feb 7, 2022

I’ve explored this issue and came to the conclusion that the current implementation is the cleanest abstraction that we can provide, so I do not think we will be changing it any time soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Dark Mode · Issue #407 - GitHub
Just a relatively simple feature request. It would be nice if there was a UI option to enable a dark mode since the...
Read more >
We need a true dark mode in Microsoft Office Apps
Feature Request : We need a true dark mode in Microsoft Office Apps ... This can be as simple as a 'Switch Background'...
Read more >
Feature request: Dark Mode - Network Scanner - SoftPerfect
I know I can change the colours of the scan results and can achieve a faux dark mode that way, but that is...
Read more >
Turn on and off dark mode on Chrome - WiseStamp
Set dark mode on google chrome on a desktop or mobile and select dark theme or night mode on PC (Windows 10), Android,...
Read more >
Dark Mode or Custom Colours for Script Editor Window
DisplayFusion will make your multi-monitor life much easier! With powerful features like Multi-Monitor Taskbars, TitleBar Buttons and fully ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found