Gathering detailed insights and metrics for @chakra-ui/color-mode
Gathering detailed insights and metrics for @chakra-ui/color-mode
Gathering detailed insights and metrics for @chakra-ui/color-mode
Gathering detailed insights and metrics for @chakra-ui/color-mode
Chakra UI is a component system for building SaaS products with speed ⚡️
npm install @chakra-ui/color-mode
Typescript
Module System
Node Version
NPM Version
@chakra-ui/cli@3.22.0
Updated on Jul 07, 2025
@chakra-ui/panda-preset@3.22.0
Updated on Jul 07, 2025
@chakra-ui/react@3.22.0
Updated on Jul 07, 2025
@chakra-ui/charts@3.22.0
Updated on Jul 07, 2025
@chakra-ui/panda-preset@3.21.1
Updated on Jun 28, 2025
@chakra-ui/charts@3.21.1
Updated on Jun 28, 2025
TypeScript (82.19%)
MDX (16.96%)
JavaScript (0.71%)
CSS (0.07%)
HTML (0.06%)
Dockerfile (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
39,350 Stars
10,957 Commits
3,444 Forks
201 Watchers
10 Branches
694 Contributors
Updated on Jul 12, 2025
Latest Version
2.2.0
Package Id
@chakra-ui/color-mode@2.2.0
Unpacked Size
110.99 kB
Size
14.43 kB
File Count
48
NPM Version
9.5.1
Node Version
18.16.1
Published on
Jul 18, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
3
React component that adds support for light mode and dark mode using
localStorage
and matchMedia
.
1yarn add @chakra-ui/color-mode 2 3# or 4 5npm i @chakra-ui/color-mode
To enable this behavior within your apps, wrap your application in a
ColorModeProvider
below the ThemeProvider
1import * as React from "react" 2import { ColorModeProvider } from "@chakra-ui/color-mode" 3import theme from "./theme" 4 5function App({ children }) { 6 return ( 7 <ThemeProvider theme={theme}> 8 <ColorModeProvider>{children}</ColorModeProvider> 9 </ThemeProvider> 10 ) 11}
Then you can use the hook useColorMode
within your application.
1function Example() { 2 const { colorMode, toggleColorMode } = useColorMode() 3 return ( 4 <header> 5 <Button onClick={toggleColorMode}> 6 Toggle {colorMode === "light" ? "Dark" : "Light"} 7 </Button> 8 </header> 9 ) 10}
No vulnerabilities found.
Reason
30 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
7 existing vulnerabilities detected
Details
Reason
Found 5/25 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More