Gathering detailed insights and metrics for @react-md/theme
Gathering detailed insights and metrics for @react-md/theme
Gathering detailed insights and metrics for @react-md/theme
Gathering detailed insights and metrics for @react-md/theme
md-editor-rt
Markdown editor for react, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...
@react-md/link
The base package for including a theme for react-md. This is required by most other packages.
md-tools-theme-component-react
md-tools的一个React组件文档系统
md-tools-theme-multi-component-react
md-tools的一个React组件库文档系统
React material design - An accessible React component library built from the Material Design guidelines in Sass
npm install @react-md/theme
Typescript
Module System
Node Version
NPM Version
@react-md/core@6.3.1
Updated on Jul 11, 2025
@react-md/core@6.3.0
Updated on Jul 04, 2025
@react-md/core@6.2.1
Updated on Jul 03, 2025
@react-md/core@6.2.0
Updated on Jun 13, 2025
@react-md/core@6.1.0
Updated on May 30, 2025
@react-md/core@6.0.2
Updated on May 24, 2025
TypeScript (89.84%)
MDX (5.71%)
SCSS (4.33%)
JavaScript (0.12%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2,337 Stars
6,519 Commits
301 Forks
53 Watchers
12 Branches
68 Contributors
Updated on Jul 17, 2025
Latest Version
5.1.6
Package Id
@react-md/theme@5.1.6
Unpacked Size
419.51 kB
Size
62.90 kB
File Count
31
NPM Version
lerna/4.0.0/node@v18.18.0+x64 (linux)
Node Version
18.18.0
Published on
Dec 11, 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
This package is used for creating a color theme within react-md. It also exposes some utility Components and mixins for updating the theme at runtime through CSS Variables.
This package can be installed through npm
if you want access to all the SCSS
variables, functions, and mixins or by using the pre-compiled bundles hosted on
https://unpkg.com.
1npm install --save @react-md/theme
Full usage and documentation can be found on the main documentation site at the theme page, but there will be a few examples in this README.
Starting with v2.0.0, react-md will use both SCSS and css variables to define themes. This allows you to use the nice dynamic themes with css variables in evergreen browsers but also support the older ones if needed.
The default theme is:
1$rmd-theme-primary: $rmd-purple-500 !default; 2$rmd-theme-secondary: $rmd-pink-a-400 !default; 3 4// the background color for your app. Normally applied to the base <html> tag 5$rmd-theme-background: #fafafa !default; 6 7// the background color for "surfaces" (things like dialogs, menus, cards, etc) 8$rmd-theme-surface: #fff !default;
This can be overridden by setting these variables to new colors that are
included in react-md, or a custom color by re-defining these values before
importing the main theme
file.
If you override the $rmd-theme-light
variable to be false
, the default theme
will be:
1$rmd-theme-primary: $rmd-purple-500 !default; 2$rmd-theme-secondary: $rmd-pink-a-400 !default; 3 4// the background color for your app. Normally applied to the base <html> tag 5$rmd-theme-background: #303030 !default; 6 7// the background color for "surfaces" (things like dialogs, menus, cards, etc) 8$rmd-theme-surface: $md-grey-800 !default;
If the theme colors are one of the material design colors, you can use some of the existing SCSS variables to update your theme.
Example:
1@import "@react-md/theme/dist/color-palette"; 2 3$rmd-theme-primary: $rmd-blue-500; 4$rmd-theme-secondary: $rmd-orange-a-400; 5 6@import "@react-md/theme/dist/mixins"; 7 8@include react-md-theme;
Note that the theme variables were overridden before importing the main
theme
file. You might have problems overriding the theme if you define them
after.
Since your company might have specific branding colors, it is also possible to define a theme that does not have material design colors at all.
1$my-awesome-company-purple: #9b59b6; 2$my-awesome-company-orange: #e67e22; 3 4$rmd-theme-primary: $my-awesome-company-purple; 5$rmd-theme-secondary: $my-awesome-company-orange; 6 7@import "@react-md/theme/dist/mixins"; 8 9@include react-md-theme;
To make including custom styles easy, it might be helpful to create the following files in your project:
src/_branding.scss
- A file that contains the color variables for your
company's brandingsrc/_react-md-overrides.scss
- A file that contains the react-md variable
overrides with new valuessrc/_all.scss
- A file that is used as a quick import to include all
available variables, mixins, and functions within any file in your app for
conveniencesrc/index.scss
- A file that is used to generate your base stylesExample:
1// in src/_branding.scss 2$my-awesome-company-purple: #9b59b6; 3$my-awesome-company-orange: #e67e22;
1// in src/_react-md-overrides.scss 2@import "branding"; 3 4$rmd-theme-primary: $my-awesome-company-purple; 5$rmd-theme-secondary: $my-awesome-company-orange;
1// in src/_all.scss 2@import "my-awesome-company-branding"; 3@import "my-awesome-company-react-md-overrides"; 4 5@import "@react-md/theme/dist/mixins";
1// in src/index.scss 2@import "all"; 3 4@include react-md-theme;
No vulnerabilities found.
Reason
30 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool detected: CodeQL
Details
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
15 existing vulnerabilities detected
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