We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I only want to use dark mode. I've tried setting it in every place possible.
layout.tsx
import type { Metadata } from 'next' import { Providers } from './providers' import { ColorModeScript } from '@chakra-ui/react' import { theme } from './theme' export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { return ( <html lang="en"> <body className={steradian.className}> <ColorModeScript initialColorMode='dark' storageKey='payy.network.color.mode' type='cookie' /> <Providers>{children}</Providers> </body> </html> ) }
providers.tsx
'use client' import { theme } from './theme' import { ChakraProvider } from '@chakra-ui/react' export function Providers({ children }: { children: React.ReactNode }) { return ( <> <ChakraProvider theme={theme}> {children} </ChakraProvider> </> ) }
theme.ts
export const theme = extendTheme({ initialColorMode: 'dark', useSystemColorMode: false })
n/a
Load page
2.2.0
Brave
"dependencies": { "@chakra-ui/icons": "^2.1.1", "@chakra-ui/next-js": "^2.2.0", "@chakra-ui/react": "^2.8.2", "@codemirror/lang-javascript": "^6.2.2", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.0", "@uiw/codemirror-theme-atomone": "^4.21.24", "@uiw/codemirror-theme-tokyo-night": "^4.21.24", "@uiw/codemirror-theme-vscode": "^4.21.24", "@uiw/react-codemirror": "^4.21.24", "add": "^2.0.6", "axios": "^1.6.7", "chakra-ui-flashless": "^0.0.8", "framer-motion": "^11.0.8", "lodash": "^4.17.21", "next": "14.1.3", "react": "^18", "react-async-hook": "^4.0.0", "react-dom": "^18", "react-resizable": "^3.0.5", "yarn": "^1.22.22" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "@types/react-resizable": "^3.0.7", "eslint": "^8", "eslint-config-next": "14.1.3", "typescript": "^5" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I only want to use dark mode. I've tried setting it in every place possible.
layout.tsx
providers.tsx
theme.ts
Link to Reproduction
n/a
Steps to reproduce
Load page
Chakra UI Version
2.2.0
Browser
Brave
Operating System
Additional Information
The text was updated successfully, but these errors were encountered: