Include the Material Lite CSS and JavaScript files in each HTML page in your project. We recommend that you use the files hosted on our CDN. You can also customize and download them to host them yourself, build them from our source code or install them in your npm/Bower project.
<link>
and <script>
elements into your HTML pages (27kB gzipped):
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="$$hosted_libs_prefix$$/$$version$$/material.indigo-pink.min.css">
<script defer src="$$hosted_libs_prefix$$/$$version$$/material.min.js"></script>
Choose color scheme
Color schemes used in Material Design are based on a primary and an accent colors which you may want to personalize. These colors are specified in the CSS file name by following this pattern: material.{primary}-{accent}.min.css
(e.g. material.indigo-pink.min.css
). Our CDN hosts a number of color combinations based on common Material Design colors. To discover and preview available color combinations use our Customize and Preview tool.
Download the minified CSS and Javascript now (27kB gzipped):
<link>
and a <script>
elements into your HTML pages and also include the Material Icon font:
<link rel="stylesheet" href="./material.min.css">
<script src="./material.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
Choose color scheme
Color schemes used in Material Design are based on a primary and an accent colors which you may want to personalize. Use the Customize and Preview tool to select and preview primary and accent colors combinations for your site. Then download your customized Material Design Lite CSS using the button and simply replace the `material.min.css` with the customized one.
Our source code is hosted on GitHub. You'll need to download the code and build it.
# Clone/copy the Material Design lite source code.
git clone https://github.com/google/material-design-lite.git
# Go into the newly created folder containing the source code.
cd material-design-lite
# Install necessary dependencies.
npm install && npm install -g gulp
# Build a production version of the components.
gulp
You'll find the Material Design Lite library's file in the dist
folder. Copy them to your project.
<link>
and a <script>
element into your HTML pages and also include the Material Icon font:
<link rel="stylesheet" href="./material.min.css">
<script src="./material.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
Simply install Material Design Lite files in your Bower enabled project using:
bower install material-design-lite --save
This will install the Material Design Lite library files in your project's bower_components
folder.
<link>
and a <script>
element into your HTML pages and also include the Material Icon font:
<link rel="stylesheet" href="/bower_components/material-design-lite/material.min.css">
<script src="/bower_components/material-design-lite/material.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
Simply install Material Design Lite files in your npm enabled project using:
npm install material-design-lite --save
This will install the Material Design Lite library files in your project's node_modules
folder.
<link>
and a <script>
element into your HTML pages and also include the Material Icon font:
<link rel="stylesheet" href="/node_modules/material-design-lite/material.min.css">
<script src="/node_modules/material-design-lite/material.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
That's it! You are now ready to add MDL components on your site.