Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kradio3/react-mdc-web

Material Design Components for React
https://github.com/kradio3/react-mdc-web

css design material mdc react web

Last synced: 3 months ago
JSON representation

Material Design Components for React

Awesome Lists containing this project

README

        

# [Material components for React](https://kradio3.github.io/react-mdc-web/)
[![Maintenance Status][status-image]][status-url] [![NPM version][npm-image]][npm-url] [![Travis build][travis-image]][travis-url]

React components based on styles from [Material Design Components Web project](https://github.com/material-components/material-components-web). Components are written in React.js. Doesn't use MDC foundation classes.

## Installation
From CDN
```html

```
From package manager
```sh
npm i --save react-mdc-web
```

## Theming
### Default theme
* Include CSS with default theme into HTML page
```html

```
* Or import it into JS/JSX file
```javascript
// MyApp/index.js
import 'material-components-web/dist/material-components-web.min.css';
```
### Custom theme
Override default theme colors with Sass or with CSS Custom Properties, just follow these guides:
* [Changing the theme with Sass](https://github.com/material-components/material-components-web/blob/master/docs/theming.md#step-3-changing-the-theme-with-sass)
* [Changing the theme with CSS Custom Properties](https://github.com/material-components/material-components-web/blob/master/docs/theming.md#step-4-changing-the-theme-with-css-custom-properties)

## Usage
```js
import React, { Component } from 'react'
import {Card, CardHeader, CardTitle, CardText, CardActions, Button} from 'react-mdc-web/lib';

class MyComponent extends Component {
render() {
return (



Title goes here



Lorem ipsum dolor sit amet, sint adipiscing ius eu


Save
Remove


);
}
}

```
More samples could be found on the [Documentation Site](https://kradio3.github.io/react-mdc-web/)

## Contribution & Local Development Guide

1. create parent folder react-mdc-web-dev
1. clone/fork react-mdc-web inside the react-mdc-web-dev folder
1. create app for testing (for example: git clone https://github.com/kradio3/react-mdc-web-showcase)
1. should now have folder with react-mdc-web-showcase and react-mdc-web folders inside of it.
1. cd react-mdc-web-showcase
1. npm rm --save-dev react-mdc-web
1. npm i --save-dev ../react-mdc-web
1. npm i --save-dev material-components-web
1. npm start
1. cd ../react-mdc-web
1. npm run watch

## License
MIT, see [LICENSE](/LICENSE) for details

[status-image]: https://img.shields.io/badge/status-maintained-brightgreen.svg
[status-url]: https://github.com/kradio3/react-mdc-web

[npm-image]: https://img.shields.io/npm/v/react-mdc-web.svg
[npm-url]: https://www.npmjs.com/package/react-mdc-web

[travis-image]: https://travis-ci.org/kradio3/react-mdc-web.svg?branch=master
[travis-url]: https://travis-ci.org/kradio3/react-mdc-web

[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
[license-url]: https://raw.githubusercontent.com/kradio3/react-mdc-web/master/LICENSE