Chakra UI is a component system for building products with speed ⚡️
Installations
npm install @chakra-ui/color-mode
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Node Version
18.16.1
NPM Version
9.5.1
Score
98.6
Supply Chain
84.3
Quality
78.5
Maintenance
100
Vulnerability
100
License
Releases
@chakra-ui/panda-preset@3.7.0
Published on 04 Feb 2025
@chakra-ui/react@3.7.0
Published on 04 Feb 2025
@chakra-ui/cli@3.7.0
Published on 04 Feb 2025
@chakra-ui/react@3.6.0
Published on 02 Feb 2025
@chakra-ui/panda-preset@3.6.0
Published on 02 Feb 2025
@chakra-ui/cli@3.6.0
Published on 02 Feb 2025
Contributors
Languages
TypeScript (82.7%)
MDX (16.49%)
JavaScript (0.65%)
CSS (0.08%)
HTML (0.07%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
79,608,839
Last Day
92,936
Last Week
92,936
Last Month
1,547,611
Last Year
27,988,761
GitHub Statistics
38,446 Stars
10,459 Commits
3,348 Forks
202 Watching
12 Branches
679 Contributors
Bundle Size
6.17 kB
Minified
2.23 kB
Minified + Gzipped
Package Meta Information
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
Publised On
18 Jul 2023
Total Downloads
Cumulative downloads
Total Downloads
79,608,839
Last day
0%
92,936
Compared to previous day
Last week
-70.1%
92,936
Compared to previous week
Last month
-7.8%
1,547,611
Compared to previous month
Last year
10.3%
27,988,761
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Peer Dependencies
1
Dev Dependencies
3
Color Mode
React component that adds support for light mode and dark mode using
localStorage
and matchMedia
.
Installation
1yarn add @chakra-ui/color-mode 2 3# or 4 5npm i @chakra-ui/color-mode
Import component
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 8 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
6 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-c76h-2ccp-4975
- Warn: Project is vulnerable to: GHSA-9crc-q9x8-hgqq
Reason
Found 4/23 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: topLevel 'actions' permission set to 'write': .github/workflows/issue-stale.yml:10
- Warn: no topLevel permission defined: .github/workflows/quality.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Info: no jobLevel write permissions found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 11 are checked with a SAST tool
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/issue-stale.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/issue-stale.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/quality.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/quality.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/quality.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/quality.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/quality.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui/release.yml/main?enable=pin
- Info: 0 out of 8 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Score
4.3
/10
Last Scanned on 2025-02-03
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