Gathering detailed insights and metrics for @devtools-ds/themes
Gathering detailed insights and metrics for @devtools-ds/themes
Gathering detailed insights and metrics for @devtools-ds/themes
Gathering detailed insights and metrics for @devtools-ds/themes
UI components, libraries, and templates for building robust devtools experiences.
npm install @devtools-ds/themes
Typescript
Module System
Node Version
NPM Version
87.1
Supply Chain
87.8
Quality
76
Maintenance
100
Vulnerability
100
License
TypeScript (82.1%)
MDX (7.18%)
JavaScript (6.69%)
CSS (3.39%)
HTML (0.64%)
Total Downloads
77,861,163
Last Day
12,688
Last Week
168,841
Last Month
1,032,471
Last Year
17,635,293
253 Stars
163 Commits
15 Forks
5 Watching
5 Branches
8 Contributors
Latest Version
1.2.1
Package Id
@devtools-ds/themes@1.2.1
Unpacked Size
82.29 kB
Size
15.36 kB
File Count
36
NPM Version
lerna/3.22.1/node@v12.22.7+x64 (linux)
Node Version
12.22.7
Cumulative downloads
Total Downloads
Last day
-73.9%
12,688
Compared to previous day
Last week
-32.6%
168,841
Compared to previous week
Last month
-9.6%
1,032,471
Compared to previous month
Last year
-58%
17,635,293
Compared to previous year
3
1
Each of the UI components in this project contains themes for multiple browsers. These themes are built using the postcss-themed package, which allows us to specify themes for multiple browsers in light and dark mode.
This package contains colors, types, and React utilities for using browser themes.
1npm i @devtools-ds/themes 2# or with yarn 3yarn add @devtools-ds/themes
You can use the ThemeProvider
component to set the theme for all @devtools-ds
components underneath it.
1import { ThemeProvider } from "@devtools-ds/themes"; 2 3<ThemeProvider theme={"chrome"} colorScheme={"light"}> 4 <YourApp /> 5</ThemeProvider>;
We also provide an AutoThemeProvider
, which will automatically set the theme and color scheme of @devtools-ds
components based on the users browser and preferred color scheme.
1<AutoThemeProvider> 2 <div id="my-app"> 3 <ObjectInspector /> 4 </div> 5</AutoThemeProvider>
You can always override the AutoThemeProvider
like a normal ThemeProvider
.
1<AutoThemeProvider theme="firefox"> 2 <div id="my-app"> 3 <ObjectInspector /> 4 </div> 5</AutoThemeProvider>
You can also have the AutoThemeProvider
automatically change the background color and text color to match the current browser and color scheme. In dark mode, this means the background color will be the browser's dark background and light text.
1<AutoThemeProvider autoStyle> 2 <div id="my-app"> 3 <ObjectInspector /> 4 </div> 5</AutoThemeProvider>
If you want to build your own component that leverages the ThemeProvider
, we have a hook that allows you to get the current theme.
1import { useTheme } from "@devtools-ds/themes"; 2 3const { currentTheme, currentColorScheme } = useTheme( 4 { theme, colorScheme }, 5 styles 6);
We have created a number of theme variables that have the common colors for different browsers. These are stored as JS objects. You can view the available variables in the Browser Themes
story in Storybook.
1import { chrome, firefox } from "@devtools-ds/themes"; 2 3chrome.light.gray01; 4firefox.dark.blue02;
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/19 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
126 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
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