Giter VIP home page Giter VIP logo

react-material-components-web's Introduction

React Material Components Web

License: MIT npm version Build Status

React wrapper of Material Components Web

Under Active Development

The project is under active development.

Every updates can contain breaking changes before 0.2.0.

We do not recommend you to use this library for product now.

Documentation

You can find a document with live demo from https://react-mdc.github.io/

Features

  • Typed strictly with TypeScript

    You can get a typing support with TypeScript

  • Stylesheet independent

    Since Material Components Web can be customized with scss, It does not depend on specific stylesheet. You can load your own stylesheet or default one.

  • Packaged each components individually

    Like Material Components Web, You can get all components individually, under @react-mdc npm scope.

Getting Start

Install the library

$ npm install --save @react-mdc/typography

Import stylesheet

<link type="text/css" href="/build/materialmaterial-components-web.min.css" rel="stylesheet" />

Or load using webpack and scss-loader

my-mdc.scss

// My main Sass file.
$mdc-theme-primary: #9c27b0;
$mdc-theme-accent: #76ff03;
$mdc-theme-background: #fff;

@import "material-components-web/material-components-web";

app.js

import * as React from 'react';
import * as ReactDOM from 'react-dom';

import "./stylesheets/my-mdc.scss";
import Main from './main.js';

ReactDOM.render(<Main />, document.getElementById('root'));

And import @react-mdc then try it.

main.js

import * as React from "react";
import Typography from "@react-mdc/typography";

export default class Main extends React.Component<{}, {}> {
    render () {
        return (
            <Typography>
                <Typography.Title>
                    This is an example
                </Typography.Title>
                <Typography.Body2>
                    Hello world!
                </Typography.Body2>
            </Typography>
        );
    }
}

Setup for Development

Bootstrap

$ lerna bootstrap

Build

$ npm run build

Run Docs

$ cd docs
$ npm start

Watch for Changes and Build

$ npm run watch

Run Test

$ npm test

to watch

$ npm test:watch

Supported Components

  • Button

  • Card

  • Checkbox

  • Dialog

  • Drawer

  • Elevation

  • Fab

  • Form Field

  • Icon Toggle

  • Layout Grid

  • List

  • Menu

  • Radio

  • Ripple

  • Rtl

  • Select

  • Snackbar

  • Switch

  • Textfield

  • Theme

  • Toolbar

  • Typography

react-material-components-web's People

Contributors

dhruvdutt avatar hardtack avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.