https://scotch.io/bar-talk/angular-material-vs-material-design-lite
In this article we’re going to explore the options that Google provides us when implementing Material Design in our websites & apps. While both Angular Material and Material Design Lite follow the Material Design specs,each library implements it in a different way.
It’s important to mention that both libraries have decent online documentation. They also have fast releases cycles and good support on github and related forums.
It’s also important to mention that both libraries,namespace their classes with themd-@H_301_12@or
mdl-@H_301_12@prefix. Which is a good practice that helps preventing classes conflicts. Unlike the classes provided with bootstrap (
btn@H_301_12@for example).
#Material Design
Material Design is a design language developed by Google. It aimed to make a consistent experience across all Google apps & platforms (YouTube,Android,Play,InBox,Gmail,etc.).
Google announced Material Design at the 2014 Google I/O conference.
Material Design emphasizes on responsive interactions,mainly through ripple effects.
Examine how the Material Response makes the element responsive to our touch input:
Source:https://www.google.com/design/spec/animation/responsive-interaction.html
Material Design also emphasizes on shadow effects to convey depth.
Watch the video again and notice how the element is being lifted on touch.
After the success that Material Design received with the Launch of Android 5,which was the first Material Design implementation,Google decided to release SDKs that allowed developers to integrate Material Design in their apps. Hence,Angular MaterialandMaterial Design Lite.
It’s not a competition between Angular Material and Material Design Lite. Google released those 2 SDKs so they can give us more choice depending on our use case.
#Getting started with Material Design Lite
Since Material Design Lite does not have any dependency,it’s going to be easy to set up.
You can use your favorite tool to grab its source code.
bower:
bower install material-design-lite --save
npm:
npm Or you can just browse togetmdl.ioand grab the source code.Next,we need to create an
index.html@H_301_12@file and include MDL’s CSS file and JS files:
<html> <body> <script src="https://storage.googleapis.com/code.getmdl.io/1.0.3/material.min.js"></script</body> </html>
Now we can immediately use any of theMDL components.
Let’s say we want to add a raised button with ripples,we just need to add the following to the body:
<button class"mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect> Button </button>
Although MDL has a Javascript library included,in most scenarios you won’t need to use Javascript at all. You only need to use the javascript library to register components when dynamically injecting templates.
componentHandler.upgradeAllRegistered();
Material Design Lite offers a variety of components such as buttons,cards,tabs,menus,sliders,text fields and more..
Here are some other elements using Material Design Lite:
Input