<ColorModeContextProvider>
<ColorModeContextProvider>
provides a React.Context
from which you can access and update the current color mode.
NOTE: Make sure to use the same values for defaultMode
and storageKey
on both <ColorModeScript>
and <ColorModeContextProvider>
, otherwise you may still see a color mode flash when loading the app.
Prop | Default | Description |
|
| default color mode is used if one hasn't been explicitly set by your app; can be |
|
| this is the key that will be set on the |
Example
Last updated