
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
md-components
Advanced tools

$ npm install --save md-components
/js/index.js
import React from 'react'
import ReactDOM from 'react-dom'
import {Shell} from 'md-components'
class App extends React.Component {
render() {
return (
<Shell title='my app'>
<div>hello world</div>
</Shell>
)
}
}
ReactDOM.render(<App />, document.getElementById('root'))
/css/index.scss
@import "../node_modules/md-components/css/base";
The 'Roboto' font must be provided separetely and is not part of the package, e.g.:
@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700');
md-components uses six colors:
The font color can be either "White" or "Black" and must be specified for each color respectively. Your main sass file might look like this:
@import "node_modules/md-components/css/base";
/* provide your custom colors */
$color-primary: #1B325F;
$color-primary-text: White;
$color-primary--dark: #303F9F;
$color-primary-text--dark: White;
$color-primary--light: #E8EAF6;
$color-primary-text--light: Black;
$color-accent: #FF4081;
$color-accent-text: White;
$color-accent--dark: #F50057;
$color-accent-text--dark: White;
$color-accent--light: #FF80AB;
$color-accent-text--light: Black;
@import "node_modules/md-components/components/header/Header";
@import "node_modules/md-components/components/navigation/Navigation";
The Google material color package provides convenient access to the "official" google color palette:
@import "palette";
@import "node_modules/md-components/css/base";
/* provide your custom colors */
$color-primary: palette(Indigo, 500);
$color-primary-text: White;
$color-primary--dark: palette(Indigo, 700);
$color-primary-text--dark: White;
$color-primary--light: palette(Indigo, 50);
$color-primary-text--light: Black;
$color-accent: palette(Pink, A200);
$color-accent-text: White;
$color-accent--dark: palette(Pink, A400);
$color-accent-text--dark: White;
$color-accent--light: palette(Pink, A100);
$color-accent-text--light: Black;
@import "node_modules/md-components/components/header/Header";
@import "node_modules/md-components/components/navigation/Navigation";
md-components into the ./examples folder. You cannot use a relative path from ./examples to the ./src since create-react-app will throw an error.
$ cd examples && npm link ../ && cd ..
$ npm run dev
$ npm run examples
If you want to support IE11, you need to supply an Array.prototype.findIndex polyfill with babel-polyfill or core-js. E.g with core-js:
npm i core-js --save
// your entry point e.g. index.js
import 'core-js/fn/array/find-index'
import ...
$ np
[17.0.0] - 2018-03-17
FAQs
Material Design React components
The npm package md-components receives a total of 429 weekly downloads. As such, md-components popularity was classified as not popular.
We found that md-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.