An implementation of Material Design components in vanilla CSS, JS, and HTML
Material Design Lite (MDL) lets you add a Material Design look and feel to your static content websites. It doesn't rely on any JavaScript frameworks or libraries.
This document is targeted at developers that will contribute to or compile MDL. If you are looking to use MDL on your website or web app please head to getmdl.io.
Internet Explorer 10 and 11, Chrome, Opera, Firefox, and Safari are fully supported.
Clone the repo using Git:
git clone https://github.com/google/material-design-lite.git
Alternatively you can download this repository.
Windows users, if you have trouble compiling due to line endings then make sure
you configure git to checkout the repository with lf
(unix) line endings. This
can be achieved by setting core.eol
.
git config core.eol lf
git config core.autocrlf input
git rm --cached -r .
git reset --hard
Remember, the master branch is considered unstable. Do not use this in production. Use a tagged state of the repository, npm, or bower for stability!
In the repo you'll find the following directories and files.
File/Folder | Provides |
---|---|
CONTRIBUTING.md | MDL contribution guidelines. |
gulpfile.js | gulp configuration for MDL. |
LICENSE | Project license information. |
package.json | npm package information. |
README.md | Details for quickly understanding the project. |
src | Source code for MDL components. |
test | Project test files. |
To get started modifying the components or the docs, first install the necessary dependencies, from the root of the project:
npm install && npm install -g gulp
MDL requires NodeJS 0.12.
Next, run the following one-liner to compile the components and the docs and spawn a local instance of the documentation site:
gulp all && gulp serve
Most changes made to files inside the src
or the docs
directory will cause
the page to reload. This page can also be loaded up on physical devices thanks
to BrowserSync.
To build a production version of the components, run:
gulp
This will clean the dist
folder and rebuild the assets for serving.
If you find MDL doesn't contain a particular component you think would be useful, please check the issue tracker in case work has already started on it. If not, you can request a new component. Please keep in mind that one of the goals of MDL is to adhere to the Material Design specs and therefore some requests might not be within the scope of this project.
If you found a bug, have any questions or want to contribute. Follow our guidelines, and help improve the Material Design Lite. For more information visit our wiki.
Material Design Lite is focused on delivering a vanilla CSS/JS/HTML library of components. We are not a framework. If you are building a single-page app and require features like two-way data-binding, templating, CSS scoping and so forth, we recommend trying out the excellent Polymer project.
© Google, 2015. Licensed under an Apache-2 license.