Material Design Web Components
Go to file
Steven Orvell 286d4733ce [first commit] lots of wip elements
These are WIP. Some known issues:
* select, chips, and textfield ripple not working
* many tests to be added
* some elements tbd, including e.g. top-app-bar and drawer
2018-04-25 19:20:55 -07:00
demos [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
packages [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
scripts [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
test/unit [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
.eslintignore [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
.eslintrc.yaml [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
.gitignore [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
CHANGELOG.md [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
CONTRIBUTING.md [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
karma.conf.js [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
lerna.json [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
LICENSE [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
package-lock.json [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
package.json [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
README.md [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
sass-template.tmpl [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00
webpack.config.js [first commit] lots of wip elements 2018-04-25 19:20:55 -07:00

Material Web Components

Material Web Components helps developers execute Material Design using web components.

Built on top of the Material Components Web project and LitElement, the Material Web Components enable a reliable development workflow to build beautiful and functional web projects.

Web Components can be seamlessly incorporated into a wide range of usage contexts. Whether you're already heavily invested in another framework or not, it should be easy to incorporate Material Web Components into your site in a lightweight, idiomatic fashion.

Demos

Quick start

Note: This guide assumes you have npm installed locally.

To get started using one of the Material Web Components in your web application, simply:

  1. npm install it

    npm install @material/mwc-button
    
  2. Load the webcomponents polyfills (see the webcomponents polyfill Readme for more info).

  3. import the element

    <script type="module">
      import {Button} from '@material/mwc-button';
    </script>
    
  4. Use the element on the page

    <mwc-button label="Hi" icon="explore" raised></mwc-button>
    

Below are instructions for setting up project development.

  1. git clone this repo
  2. install dependencies by running npm run bootstrap
  3. to run a development server: npm run dev (view the demos by accessing <dev server url>/demos/index.html)
  4. to run tests: npm run test

Rebuild CSS for components

Components define their css using SASS. The SASS output is built into a javascript module which exports the component's styling as a (lit-html)[https://github.com/Polymer/lit-html] template.

To compile the component SASS run

npm run update-styling

Browser Support

We officially support the last two versions of every major browser. Specifically, we test on the following browsers:

  • Chrome
  • Safari
  • Firefox
  • IE 11/Edge
  • Opera
  • Mobile Safari
  • Chrome on Android