2.1.0 • Published 4 years ago

react-mdl v2.1.0

Weekly downloads
2,260
License
MIT
Repository
github
Last release
4 years ago

React-MDL

Maintenance Status NPM version Build Status Linux Coverage Status

Deprecation notice

This library is now deprecated. It's higly recommended to use Material Design Components instead.

Description

React-MDL is a set of React components build on top of Material Design Litev1.2.1

Requirements

Instead of using the official material.css and material.js files from the MDL project, you should use the files we provide in /extra. The reason to that is because the official Layout component is not fully compatible with React. We made a patch and we re-exported everything so people can still use it. If you're worried about the changes we made, you can take a look at the patch note or read about the issue in this ticket.

<link rel="stylesheet" href="material.css">
<script src="material.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

Create React App

The above instructions won’t work if you use Create React App with react-scripts higher than 0.4.0.
If you use it, add only this one line to your HTML:

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

Then add these lines to src/index.js:

import 'react-mdl/extra/material.css';
import 'react-mdl/extra/material.js';

Installation

npm install --save react-mdl

Usage

You can use React-MDL through a bundler like webpack or browserify by importing react-mdl in your application:

import { Button, Card, CardText } from 'react-mdl';

// or...
import Button from 'react-mdl/lib/Button';
import { Card, CardText, CardActions } from 'react-mdl/lib/Card';

Alternatively, you can include node_modules/react-mdl/out/ReactMDL.js as a script, but you'll likely want to copy it to a folder outside of node_modules first, such as lib or vendor. Then a global ReactMDL will be available:

const { Button, Card, CardText } = ReactMDL;

For a listing of available components, as well as specific usage information, check out the Components page on the website.

Some extra components can be found in the react-mdl-extra package.

License

MIT, see LICENSE.md for details.

2.1.0

4 years ago

2.0.2

4 years ago

1.11.0

6 years ago

1.10.3

7 years ago

1.10.2

7 years ago

1.10.1

7 years ago

1.10.0

7 years ago

1.9.0

7 years ago

1.8.0

7 years ago

1.7.2

8 years ago

1.7.1

8 years ago

1.7.0

8 years ago

1.6.1

8 years ago

1.6.0

8 years ago

1.5.4

8 years ago

1.5.3

8 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.4.4

8 years ago

1.4.3

8 years ago

1.4.2

8 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.15.0

9 years ago

0.14.0

9 years ago

0.13.0

9 years ago

0.12.1

9 years ago

0.12.0

9 years ago

0.11.1

9 years ago

0.11.0

9 years ago

0.10.0

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago

0.8.0

9 years ago

0.7.0

9 years ago

0.6.0

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.0

9 years ago