Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tleunen/react-mdl
React Components for Material Design Lite
https://github.com/tleunen/react-mdl
Last synced: 3 months ago
JSON representation
React Components for Material Design Lite
- Host: GitHub
- URL: https://github.com/tleunen/react-mdl
- Owner: tleunen
- License: mit
- Archived: true
- Created: 2015-07-19T20:52:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-01T20:55:25.000Z (almost 4 years ago)
- Last Synced: 2024-10-13T13:21:54.790Z (3 months ago)
- Language: CSS
- Homepage: https://tleunen.github.io/react-mdl/
- Size: 7.85 MB
- Stars: 1,762
- Watchers: 55
- Forks: 255
- Open Issues: 81
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-react-components-all - react-mdl - React Components for Material Design Lite. (Uncategorized / Uncategorized)
- awesome-list - react-mdl - React Components for Material Design Lite. (Cases / Responsive)
README
# [React-MDL][react-mdl-url]
[![Maintenance Status][status-image]][status-url] [![NPM version][npm-image]][npm-url] [![Build Status Linux][circleci-image]][circleci-url] [![Coverage Status][coverage-image]][coverage-url]### Deprecation notice
This library is now deprecated. It's higly recommended to use [Material Design Components](https://github.com/material-components/material-components-web) instead.
## Description
React-MDL is a set of React components build on top of [Material Design Lite][google-mdl-url]v1.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](/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](/extra/layout-patch.diff) or read about the issue in [this ticket](https://github.com/google/material-design-lite/issues/1356).```html
```
### Create React App
The above instructions won’t work if you use [Create React App](https://github.com/facebookincubator/create-react-app) with `react-scripts` higher than `0.4.0`.
If you use it, add only this one line to your HTML:```html
```
Then add these lines to `src/index.js`:
```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][webpack-url] or [browserify][browserify-url] by importing `react-mdl` in your application:
```js
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:
```js
const { Button, Card, CardText } = ReactMDL;
```For a listing of available components, as well as specific usage information, check out the [Components][react-mdl-components-url] page on the website.
Some extra components can be found in the [react-mdl-extra](https://github.com/HriBB/react-mdl-extra) package.
## License
MIT, see [LICENSE.md](/LICENSE.md) for details.
[react-mdl-url]: https://react-mdl.github.io/react-mdl/
[google-mdl-url]: https://github.com/google/material-design-lite[status-image]: https://img.shields.io/maintenance/yes/2016.svg
[status-url]: https://github.com/react-mdl/react-mdl[npm-image]: https://img.shields.io/npm/v/react-mdl.svg
[npm-url]: https://www.npmjs.com/package/react-mdl[circleci-image]: https://img.shields.io/circleci/project/react-mdl/react-mdl/master.svg
[circleci-url]: https://circleci.com/gh/react-mdl/react-mdl[coverage-image]: https://codecov.io/gh/react-mdl/react-mdl/branch/master/graph/badge.svg
[coverage-url]: https://codecov.io/gh/react-mdl/react-mdl[react-mdl-components-url]: https://react-mdl.github.io/react-mdl/components/
[webpack-url]: https://webpack.github.io/
[browserify-url]: http://browserify.org/