<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">

Similar documents
In this tutorial, we are going to learn how to use the various features available in Flexbox.

This tutorial has been prepared for beginners to help them understand the basic functionalities of Gulp.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Meteor

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer ASP.NET WP

Scalable Vector Graphics commonly known as SVG is a XML based format to draw vector images. It is used to draw twodimentional vector images.

appendix Introduction to Foundation, the front-end framework

Purpose of this doc. Most minimal. Start building your own portfolio page!

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Material Design Lite

Front-End UI: Bootstrap

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. RichFaces

Microsoft Excel is a spreadsheet tool capable of performing calculations, analyzing data and integrating information from different programs.

Before proceeding with this tutorial, you should have a good understanding of the fundamental concepts of marketing.

This is a small tutorial where we will cover all the basic steps needed to start with Balsamiq Mockups.

UX/UI Controller Component

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Drupal

WebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. WordPress

Session 5. Web Page Generation. Reading & Reference

This is a brief tutorial that explains how to make use of Sqoop in Hadoop ecosystem.

This tutorial is designed for software programmers who would like to learn the basics of ASP.NET Core from scratch.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Laravel

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

This tutorial has been prepared for beginners to help them understand the simple but effective SEO characteristics.

This tutorial will guide users on how to utilize TestLodge in reporting and maintaining the testing activities.

Testing is the process of evaluating a system or its component(s) with the intent to find whether it satisfies the specified requirements or not.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Joomla

SAP Lumira is known as a visual intelligence tool that is used to visualize data and create stories to provide graphical details of the data.

Adaptations by PVII responsive and then creates your page instantly Al Sparber & Gerry Jacobsen PVII

This tutorial provides a basic understanding of how to generate professional reports using Pentaho Report Designer.

Responsive Web Design and Bootstrap MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Lab 1: Introducing HTML5 and CSS3

This tutorial covers most of the topics required for a basic understanding of KnockoutJS and explains its various functionalities.

This tutorial explains the key concepts of Web Dynpro with relevant screenshots for better understanding.

This tutorial also elaborates on other related methodologies like Agile, RAD and Prototyping.

So, this tutorial is divided into various chapters and describes the 5G technology, its applications, challenges, etc., in detail.

Introduction to Computer Science Web Development

This is an introductory tutorial designed for beginners to help them understand the basics of Radius.

Leaflet.js is an open-source library using which we can deploy interactive, simple, lightweight and simple web maps.

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. PySpark

MindManager HTML5 Export Release Notes

Programming web design MICHAEL BERNSTEIN CS 247

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

Stamp Builder. Documentation. v1.0.0

General Reproduction and Usage Guidelines Bizrate Insights Updated 13 Aug, 2018

Mobile Web Applications. Gary Dubuque IT Research Architect Department of Revenue

SharePoint List Booster Features

Before you start proceeding with this tutorial, we are assuming that you are already aware about the basics of Web development.

Website Development with HTML5, CSS and Bootstrap

WEBSI TE DESIGNING TRAINING

Bootstrap 1/20

In-ADS User Guide. Estonian Land Board Versioon 1.9.1

What's New in Sitecore CMS 6.4

International Conference KNOWLEDGE-BASED ORGANIZATION Vol. XXIII No RESPONSIVE WEB DESIGN TECHNIQUES. Luminita GIURGIU, Ilie GLIGOREA

Building Web Applications

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright DAX

This tutorial will show you, how to use RSpec to test your code when building applications with Ruby.

Custom Contact Forms Magento 2 Extension

Want to read more? You can buy this book at oreilly.com in print and ebook format. Buy 2 books, get the 3rd FREE!

This tutorial will help you understand JSON and its use within various programming languages such as PHP, PERL, Python, Ruby, Java, etc.

Web Programming BootStrap Unit Exercises

This tutorial will help both students as well as professionals who want to make their websites or personal blogs more attractive.

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

Adobe Dreamweaver CS6 Digital Classroom

AP CS P. Unit 2. Introduction to HTML and CSS

INTRODUCTION TO CSS. Topics MODULE 5

Create First Web Page With Bootstrap

Web Programming HTML CSS JavaScript Step by step Exercises Hans-Petter Halvorsen

Reader Release Notes. January 7, Release version: 3.1

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Jenkins

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. TurboGears

ThingLink User Guide. Andy Chen Eric Ouyang Giovanni Tenorio Ashton Yon

Scripting. Web Architecture and Information Management [./] Spring 2009 INFO (CCN 42509) Contents

Web Development & Design Foundations with HTML5

General Reproduction and Usage Guidelines Bizrate Insights Updated 23 Oct, 2017

Building and packaging mobile apps in Dreamweaver CC

Service Quotation. School Employees LC Credit Union ATTN: Neil Sommers 340 GRISWOLD ROAD ELYRIA, OHIO USA

CSC 121 Computers and Scientific Thinking

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Django

Dart is an open-source general-purpose programming language. It is originally developed by Google and later approved as a standard by ECMA.

5 Snowdonia. 94 Web Applications with C#.ASP

Dreamweaver Basics Workshop

CSS. MPRI : Web Data Management. Antoine Amarilli Friday, December 7th 1/43

Frontend guide. Everything you need to know about HTML, CSS, JavaScript and DOM. Dejan V Čančarević

CSS.

Here are some links to get you started in learning more about CSS3 media queries and responsive web design:

Breadcrumb Navigation

IBM Forms V8.0 Custom Themes IBM Corporation

Guidelines for doing the short exercises

Getting Started with Eric Meyer's CSS Sculptor 1.0

KSB Mobile App Style Guide 4. Tablets 1. KSB Mobile App Style Guide

CSS is applied to an existing HTML web document--both working in tandem to display web pages.

Dealer Instructions for the Product Configurator

This tutorial is designed for those who would like to understand the basics of i-mode in simple and easy steps.

Overview of the Adobe Dreamweaver CS5 workspace

Cracked IntegralUI Studio for Web all pc software ]

Web Content. Overview. Web Content Mini WYSIWYG Editor

Parrot is a virtual machine designed to efficiently compile and execute bytecode for interpreted languages.

Experience SAP HANA Cloud Portal. Use SAP HANA Cloud Portal to Create Engaging Websites in 5 Simple Steps

Transcription:

About the Tutorial Materialize is a UI component library created with CSS, JavaScript, and HTML. Materialize UI components help in constructing attractive, consistent, and functional web pages and web apps, while adhering to modern web design principles such as browser portability, device independence, and graceful degradation. It helps in creating faster, beautiful, and responsive websites. It is inspired from Google Material Design. Audience This tutorial is meant for professionals who would like to learn the basics of Materialize and how to use it to create faster, beautiful, and responsive web pages and apps. This tutorial explains all the fundamental concepts of Materialize. Prerequisites Before proceeding with this tutorial, you should have a basic understanding of HTML, CSS, JavaScript, Document Object Model (DOM), and any text editor. In addition, it will help if you know how web-based applications work. Execute Materialize Online For most of the examples given in this tutorial, you will find a Try-it option. Use this option to execute your Materialize programs on the spot and enjoy your learning. Try the following example using the Try-it option available at the top right corner of the following sample code box. <!DOCTYPE html> <html> <head> <title>the Materialize Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=material+icons"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <script type="text/javascript" src="https://code.jquery.com/jquery- 2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></scrip t> </head> <body> <div class="card-panel teal lighten-2"><h3>hello World!</h3> </body> </html> i

Copyright & Disclaimer Copyright 2017 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at contact@tutorialspoint.com ii

Table of Contents About the Tutorial... i Audience... i Prerequisites... i Execute Materialize Online... i Copyright & Disclaimer... ii Table of Contents... iii 1. MATERIALIZE OVERVIEW... 1 2. MATERIALIZE ENVIRONMENT SETUP... 3 How to Use Materialize?... 3 Local Installation... 3 CDN Based Version... 4 3. MATERIALIZE COLORS... 6 4. MATERIALIZE GRIDS... 11 Columns for Small Screen Devices... 11 Columns for Medium Screen Devices... 12 Columns for Large Screen Devices... 12 5. MATERIALIZE HELPERS... 16 6. MATERIALIZE MEDIA... 21 7. MATERIALIZE SHADOWS... 24 8. MATERIALIZE TABLES... 29 9. MATERIALIZE TYPOGRAPHY... 35 10. MATERIALIZE BADGES... 38 11. MATERIALIZE BUTTONS... 41 iii

12. MATERIALIZE BREADCRUMB... 45 13. MATERIALIZE CARDS... 48 14. MATERIALIZE CHIPS... 54 15. MATERIALIZE COLLECTIONS... 57 16. MATERIALIZE FOOTER... 63 17. MATERIALIZE FORM... 66 Important Input Controls... 69 Selects... 70 Switches... 73 File... 75 Range... 77 DatePicker... 78 Character Counter... 79 18. MATERIALIZE ICONS... 82 19. MATERIALIZE NAVBAR... 86 20. MATERIALIZE PAGINATION... 91 21. MATERIALIZE PRELOADER... 94 22. MATERIALIZE COLLAPSIBLE... 97 23. MATERIALIZE DIALOGS... 103 24. MATERIALIZE DROPDOWNS... 106 25. MATERIALIZE TABS... 109 26. MATERIALIZE WAVES... 112 iv

1. MATERIALIZE OVERVIEW Materialize Materialize is a UI component library created with CSS, JavaScript, and HTML. Materialize reusable UI components help in constructing attractive, consistent, and functional web pages and web apps while adhering to modern web design principles such as browser portability, device independence, and graceful degradation. Some of its salient features are as follows: In-built responsive designing. Standard CSS with minimal footprint. New versions of common user interface controls such as buttons, checkboxes, and text fields adapted to follow Material Design concepts. Enhanced and specialized features such as cards, tabs, navigation bars, toasts, and so on. Free to use and requires jquery JavaScript library to function properly. Cross-browser, and can be used to create reusable web components. Responsive Design Materialize has in-built responsive designing so that the website created using Materialize will redesign itself as per the device size. Materialize classes are created in such a way that the website can fit any screen size. The websites created using Materialize are fully compatible with PC, tablets, and mobile devices. Extensible Materialize is by design very minimal and flat. It is designed considering the fact that it is much easier to add new CSS rules than to overwrite the existing CSS rules. It supports shadows and bold colors. The colors and shades remain uniform across various platforms and devices. And most important of all, it is absolutely free to use. 5

2. MATERIALIZE ENVIRONMENT SETUP Materialize How to Use Materialize? There are two ways to use Materialize: Local Installation - You can download the materialize.min.css and materialize.min.js files on your local machine and include it in your HTML code. CDN Based Version - You can include the materialize.min.css and materialize.min.js files into your HTML code directly from the Content Delivery Network (CDN). Local Installation Go to http://materializecss.com/getting-started.html to download the latest version available. Then, put the downloaded materialize.min.js file in a directory of your website, e.g. /js and materialize.min.css in /css. Example Include the css and js file in your HTML file as follows. <!DOCTYPE html> <html> <head> <title>the Materialize Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=material+icons"> <link rel="stylesheet" href="materialize.min.css"> <script type="text/javascript" src="https://code.jquery.com/jquery- 2.1.1.min.js"></script> </head> <body> <script src="materialize.min.js"></script> <div class="card-panel teal lighten-2"><h3>hello World!</h3> </body> </html> 6

It will produce the following result. CDN Based Version You can include the materialize.min.js and materialize.min.css files into your HTML code directly from the Content Delivery Network (CDN). cdnjs.cloudflare.com provides content for the latest version. We are using cdnjs.cloudflare.com CDN version of the library throughout this tutorial. Example Rewrite the above example using materialize.min.css and materialize.min.js from cdnjs.cloudflare.com CDN. <!DOCTYPE html> <html> <head> <title>the Materialize Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=material+icons"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.mi n.css"> <script type="text/javascript" src="https://code.jquery.com/jquery- 2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min. js"></script> </head> 7

<body> <div class="card-panel teal lighten-2"><h3>hello World!</h3> </body> </html> It will produce the following result. 8

3. MATERIALIZE COLORS Materialize Materialize supports a rich set of color classes. These color classes are inspired and developed considering the colors used in marketing, road signs, and sticky notes. red pink purple deep-purple indigo blue light-blue cyan teal green light-green lime yellow amber orange deep-orange brown grey blue-grey black white transparent Usage Following is the list of lightness/darkness classes, which can be used to vary the color applied. lighten-1 lighten-2 lighten-3 lighten-4 lighten-5 darken-1 darken-2 darken-3 darken-4 accent-1 accent-2 accent-3 accent-4 Example 9

The following example demonstrates how to use the above classes to render the background or to change the color of the text. In case of background, add the classes as such and in case of text, suffix '-text' to color class and prefix 'text-' to lightning class. materialize_colors.htm <!DOCTYPE html> <html> <head> <title>the Materialize Colors Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=material+icons"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.mi n.css"> <script type="text/javascript" src="https://code.jquery.com/jquery- 2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min. js"></script> </head> <body> <h2>color Theme Demo</h2> <hr/> <div class="card-panel"> <div class="card-panel red lighten-2"> <h1>red Colored Theme</h1> <span class="red-text text-darken-2"> <h2>red Colored Text</h2> </span> <ul> <li class="red lighten-5"><p>using red lighten-5</p></li> <li class="red lighten-4"><p>using red lighten-4</p></li> <li class="red lighten-3"><p>using red lighten-3</p></li> <li class="red lighten-2"><p>using red lighten-2</p></li> <li class="red lighten-1"><p>using red lighten-1</p></li> <li class="red"><p>using red</p></li> 10

<li class="red darken-1"><p>using red darken-1</p></li> <li class="red darken-2"><p>using red darken-2</p></li> <li class="red darken-3"><p>using red darken-3</p></li> <li class="red darken-4"><p>using red darken-4</p></li> <li class="red accent-1"><p>using red accent-1</p></li> <li class="red accent-2"><p>using red accent-2</p></li> <li class="red accent-3"><p>using red accent-3</p></li> <li class="red accent-4"><p>using red accent-4</p></li> </ul> </body> </html> Result Verify the result. 11

12

4. MATERIALIZE GRIDS Materialize Materialize provides a 12 column fluid responsive grid. It uses the row and column style classes to define rows and columns respectively. Sr. No. 1 2 Class Name & Description row Specifies a padding-less container to be used for responsive columns. This class is mandatory for responsive classes to be fully responsive. col Specifies a column with sub-classes. col has several sub-classes meant for different types of screens. Columns for Small Screen Devices Following is a list of column-level styles for small screen devices, typically smartphones. Sr. No. Class Name & Description 1 2 3 4 s1 Defines 1 of 12 columns with width as 08.33%. s2 Defines 2 of 12 columns with width as 16.66%. s3 Defines 3 of 12 columns with width as 25.00%. s4 Defines 4 of 12 columns with width as 33.33%. s5 s11 12 s12 Defines 12 of 12 columns with width as 100%. Default class for small screen phones. 13

Columns for Medium Screen Devices Following is a list of column-level styles for medium screen devices, typically tablets. Sr. No. 1 2 3 4 m1 Defines 1 of 12 columns with width as 08.33%. m2 Defines 2 of 12 columns with width as 16.66%. m3 Defines 3 of 12 columns with width as 25.00%. m4 Defines 4 of 12 columns with width as 33.33%. Class Name & Description m5 - m11 12 m12 Defines 12 of 12 columns with width as 100%. Default class for medium screen phones. Columns for Large Screen Devices Following is a list of column-level styles for large screen devices, typically laptops. Sr. No. 1 2 3 4 l1 Defines 1 of 12 columns with width as 08.33%. l2 Defines 2 of 12 columns with width as 16.66%. l3 Defines 3 of 12 columns with width as 25.00%. l4 Defines 4 of 12 columns with width as 33.33%. Class Name & Description l5 l11 12 l12 Defines 12 of 12 columns with width as 100%. Default class for large screen devices. 14

Usage Each subclass determines the number of columns of the grid to be used based on the type of a device. Consider the following HTML snippet. <div class="row"> <div class="col s2 m4 l3"> <p>this text will use 2 columns on a small screen, 4 on a medium screen, and 3 on a large screen.</p> Default columns to be used are 12 on a device, if a sub-class is not mentioned in the class attribute of an HTML element. Example materialize_grids.htm <!DOCTYPE html> <html> <head> <title>the Materialize Grids Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=material+icons"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.mi n.css"> <script type="text/javascript" src="https://code.jquery.com/jquery- 2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min. js"></script> </head> <body> <div class="teal"> <h2>mobile First Design Demo</h2> <p>resize the window to see the effect!</p> 15

<hr/> <div class="row"> <div class="col m1 grey center">1 <div class="col m1 center">2 <div class="col m1 grey center">3 <div class="col m1 center">4 <div class="col m1 grey center">5 <div class="col m1 center">6 <div class="col m1 center grey">7 <div class="col m1 center">8 <div class="col m1 center grey">9 <div class="col m1 center">10 <div class="col m1 center grey">11 <div class="col m1 center">12 <div class="row"> <div class="col m4 l3 yellow"> <p>this text will use 12 columns on a small screen, 4 on a medium screen (m4), and 3 on a large screen (l3).</p> <div class="col s4 m8 l9 grey"> <p>this text will use 4 columns on a small screen (s4), 8 on a medium screen (m8), and 9 on a large screen (l9).</p> </body> </html> Result Verify the result. 16

17

5. MATERIALIZE HELPERS Materialize Materialize has several utility classes useful for day-to-day designing needs. Color utility classes For example,.red,.green,.grey and so on Alignment utility classes For example,.valign-wrapper,.left-align,.right-align,.center-align,.left,.right Hiding Content utility classes as per device size For example,.hide,.hide-onsmall-only,.hide-on-med-only,.hide-on-med-and-down,.hide-on-med-and-up and.hide-on-large-only Formatting utility classes For example, truncate, hoverable Example materialize_utilities.htm <!DOCTYPE html> <html> <head> <title>the Materialize Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=material+icons"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.mi n.css"> <script type="text/javascript" src="https://code.jquery.com/jquery- 2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min. js"></script> </head> <body class="container"> <h2>materialize Utilities</h2> <hr/> <h3>color Utilities Demo</h3> <div class="red"> 18

<p>the latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many HTML5 features and Internet Explorer 9.0 will also have support for some HTML5 functionality.</p> <div class="green"> <p>the mobile web browsers that come pre-installed on iphones, ipads, and Android phones all have excellent support for HTML5.</p> <h3>alignment Utilities Demo</h3> <div class="card-panel valign-wrapper"> <p class="valign">vertically Aligned Text</p> <div class="card-panel"> <div><p class="left-align">left Aligned Text</p> <div><p class="right-align">right Aligned Text</p> <div><p class="center-align">center Aligned Text</p> <h3>hide Utilities Demo</h3> <div class="hide"> <p>hidden on all devices</p> <div class="hide-on-small-only"> <p>hidden on mobile devices</p> <h3>formatting Utilities Demo</h3> <div class="card-panel"> <p class="truncate">the latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many HTML5 features and Internet Explorer 9.0 will also have support for some HTML5 functionality.</p> <div class="card-panel hoverable"> <p>the mobile web browsers that come pre-installed on iphones, ipads, and Android phones all have excellent support for HTML5.</p> <h3>center Utility Demo</h3> <div class="card-panel center"> <img src="html5-mini-logo.jpg" alt="html5"> 19

</body> </html> Result Verify the result. 20

21

End of ebook preview If you liked what you saw Buy it from our store @ https://store.tutorialspoint.com 22