https://github.com/morlay/material-design-lite-cjs
[DEPRECATED]
https://github.com/morlay/material-design-lite-cjs
Last synced: 11 days ago
JSON representation
[DEPRECATED]
- Host: GitHub
- URL: https://github.com/morlay/material-design-lite-cjs
- Owner: morlay
- Created: 2015-12-16T10:51:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-17T07:57:31.000Z (over 10 years ago)
- Last Synced: 2026-04-26T21:10:09.766Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Material Design Lite CommonJS Version
[](https://npmjs.org/package/material-design-lite-cjs)
[](https://david-dm.org/morlay/material-design-lite-cjs)
[](https://npmjs.org/package/material-design-lite-cjs)
Automatic wrapper CommonJS from https://github.com/google/material-design-lite
Just want to make server render happy :(
```
npm i material-design-lite-cjs -S
```
and
```js
import { MaterialButton } from 'material-design-lite-cjs/src/button'
```
Notice:
* This lib only includes MaterialClass files, MaterialButton, MaterialTooltip and ..;
* `componentHandler` is not necessary, so remove it in each file.
in most usage with component way, React or Angular or other ui framework which have life cycle.
```js
// when component mount
this._materialInstance = new MaterialButton(findDOMNode(this));
// when component unmount
this._materialInstance.mdlDowngrade();
```
* sass files need to import from original one;
```
@import '~material-design-lite/src/button/button'
```
* don't forget `material-design-lite/src/third_party/*.js` as polyfill for cross-browser support