Skip to content

Commit 51eb166

Browse files
committed
feat: Disable Chakra's system color subscription for better compatibility with next-themes
1 parent 79d2f71 commit 51eb166

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/@chakra-ui/theme.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ import semanticTokens from "./semanticTokens"
77
const config: ThemeConfig = {
88
cssVarPrefix: "eth",
99
initialColorMode: "system",
10-
useSystemColorMode: true,
10+
/**
11+
* Disable Chakra's system color subscription, as it works differently from
12+
* `next-themes` and causes a desync with it.
13+
*
14+
* Chakra will always change the color mode based on the system preference.
15+
* While `next-themes` will only change to the system preference if the user
16+
* has `system` as their active theme.
17+
*/
18+
useSystemColorMode: false,
1119
}
1220

1321
/**

0 commit comments

Comments
 (0)