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.

Documentation for useSystemColorMode?

See original GitHub issue

Feature request

I can see useSystemColorMode is set to false on this page on the documentation but i don’t see any explanation about what that actually do?

Is your feature request related to a problem? Please describe.

It’s more of a documentation / explanation request than a feature request?

Describe the solution you’d like

Some comment/explanation about that flag on the documentation?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
hemscommented, Oct 14, 2020

Hi - it’s about this section, we definitely clarify that.

image

useSystemColorMode indicates Chakra to detect the theme via @media (prefers-color-scheme: dark | light).

Thank you for pointing that out!

Note that if you set this to true, it takes priority over a) the default, initialColorMode b) users choice when the user toggled the theme once.

I don’t think a) and b) were clear, all the examples on the website only show it set to false and there is not real explanation of what happens if you turn it to true?

Perhaps a section named “Using System Color Mode” could be added?

Also, i would guess most end-users would only want to use the System Color while the user has not toggled the theme, once the user toggles and it’s saved on localStorag / cookies, then system color mode should not take priority over the user preferences? As in: i would guess the system colour would only be used as a “first guess colour before the user decides”?

Perhaps to make this a little bit more customiseable the system color code could be exposed as a hook or function under theme-tools ?

0reactions
stale[bot]commented, Dec 25, 2020

Hi! This issue hasn’t seen any activity recently. We close inactive issues after 35 days to manage the volume of issues we receive. If we missed this issue or you want to keep it open, please reply here. That will reset the timer and allow more time for this issue to be addressed before it is closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Color Mode - Chakra UI
The theme config for color mode has 2 options: initialColorMode : The initial mode you'd like your app to start with; useSystemColorMode :...
Read more >
Color Mode - Chakra UI
useColorModeValue is a React hook used to change any value or style based on the color mode. It takes 2 arguments: the value...
Read more >
How to fix "TypeError: Cannot read properties of undefined ...
Whenever I start the project it gives me the error, "TypeError: Cannot read properties of undefined (reading 'useSystemColorMode')". I didn't ...
Read more >
Color mode (Dark Mode) - NativeBase
useColorModeValue is a React hook used to change any value or style based on the color mode. It takes 2 arguments: the value...
Read more >
Theme - Refine Dev
Refer to the Chakra UI documentation for more information about theme. → ... useSystemColorMode: false,
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