blob: 62a4e35e78de7961dee76915127a6e76a39c108e [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
8 <title>Material Design Lite</title>
9
10 <!-- Add to homescreen -->
11 <link rel="manifest" href="manifest.json">
12
13 <!-- Fallback to homescreen for Chrome <39 on Android -->
14 <meta name="mobile-web-app-capable" content="yes">
15 <meta name="application-name" content="Material Design Lite">
16 <link rel="icon" sizes="192x192" href="../assets/android-desktop.png">
17
18 <!-- Add to homescreen for Safari on iOS -->
19 <meta name="apple-mobile-web-app-capable" content="yes">
20 <meta name="apple-mobile-web-app-status-bar-style" content="black">
21 <meta name="apple-mobile-web-app-title" content="Material Design Lite">
22 <link rel="apple-touch-icon" href="../assets/ios-desktop.png">
23
24 <!-- TODO: Tile icon for Win8 (144x144 + tile color) -->
25 <!-- <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png"> -->
26 <!-- <meta name="msapplication-TileColor" content="#3372DF"> -->
27
28 <meta name="theme-color" content="#263238">
29
30 <link rel="shortcut icon" href="../assets/favicon.png">
31 <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
32 <!--
33 <link rel="canonical" href="http://www.example.com/">
34 -->
35
36 <!-- Page styles -->
37 <link rel="stylesheet" href="../assets/prism-default.css">
38 <link rel="stylesheet" href="../material.min.css">
39 <link rel="stylesheet" href="../assets/main.css">
40
41 <!-- Fonts -->
42 <link href='https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en' rel='stylesheet' type='text/css'>
43 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
44 </head>
45 <body class="components">
46 <!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
47 <script>
48 // if (document.location.hostname !== 'localhost' &&
49 // document.location.hostname !== '127.0.0.1' &&
50 // document.location.hostname.search('.corp.') === -1) {
51 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
52 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
53 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
54 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
55 ga('create', 'UA-25993200-9', 'auto');
56 // If a specific component page is loaded directly we'll attribute the
57 // page view to the specific component's page
58 if (window.location.pathname.indexOf('/components/') !== -1 &&
59 window.location.hash.indexOf('-section') !== -1) {
60 ga('send', 'pageview', '/components/' +
61 window.location.hash.split('#')[1].split('/')[0]);
62 } else {
63 ga('send', 'pageview');
64 }
65 // }
66
67 // Setup error tracking before anything else runs.
68 window.onerror = function(message, file, lineNumber, columnNumber, error) {
69 try {
70 if (error !== undefined) {
71 message = error.stack;
72 }
73 ga('send', 'event', 'error', file + ':' + lineNumber, String(message));
74 } catch (e) {
75 // no-op
76 }
77 };
78 </script>
79 <div class="image-preloader"></div>
80 <div class="docs-layout mdl-layout mdl-js-layout">
81 <header class="docs-layout-header mdl-layout__header">
82 <div class="mdl-layout__header-row">
83 <span class="docs-layout-title mdl-layout-title"><a href="../">Material<br>Design<br>Lite</a></span>
84 </div>
85 <div class="docs-navigation__container">
86 <nav class="docs-navigation mdl-navigation">
87 <a href="../index.html" class="mdl-navigation__link about">About</a>
88 <a href="../started/index.html" class="mdl-navigation__link started">Getting Started</a>
89 <a href="../templates/index.html" class="mdl-navigation__link templates">Templates</a>
90 <a href="../components/index.html" class="mdl-navigation__link components">Components</a>
91 <a href="../styles/index.html" class="mdl-navigation__link styles">Styles</a>
92 <a href="../customize/index.html" class="mdl-navigation__link customize">Customize</a>
93 <a href="../showcase/index.html" class="mdl-navigation__link showcase">Showcase</a>
94 <a href="../faq/index.html" class="mdl-navigation__link faq">FAQ</a>
95 <div class="spacer"></div>
96 <a href="https://github.com/google/material-design-lite" class="mdl-navigation__link mdl-navigation__link--icon github"><i class="material-icons">link</i><span>GitHub</span></a>
97 <a href="../started/index.html#download" class="mdl-navigation__link mdl-navigation__link--icon download">
98 <i class="material-icons">&#xE2C4;</i><span>Download</span>
99 <button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--fab mdl-button--mini-fab mdl-color--lime-A200">
100 <i class="material-icons">&#xE2C4;</i>
101 </button>
102 </a>
103 </nav>
104 </div>
105 <i class="material-icons scrollindicator scrollindicator--right">&#xE315;</i>
106 <i class="material-icons scrollindicator scrollindicator--left">&#xE314;</i>
107 </header>
108 <main class="docs-layout-content mdl-layout__content mdl-color-text--grey-600">
109 <div class="content mdl-grid mdl-grid--no-spacing" id="content">
110 <div class="subpageheader mdl-cell--12-col">Components</div>
111
112<link href="../assets/components.css" rel="stylesheet">
113<script src="../assets/snippets.js"></script>
114<script src="../assets/components.js"></script>
115<link rel="stylesheet" href="../components/demos.css">
116
117<div class="mdl-components mdl-js-components mdl-cell mdl-cell--12-col">
118 <aside class="mdl-components__nav docs-text-styling mdl-shadow--4dp">
119
120 <a href="#badges-section" class="mdl-components__link mdl-component badges">
121 <div class="mdl-components__link-image"
122 style="background-image: url('../assets/comp_badges.png')">
123 </div>
124 <span class="mdl-components__link-text">Badges</span>
125 </a>
126
127 <a href="#buttons-section" class="mdl-components__link mdl-component buttons">
128 <div class="mdl-components__link-image"
129 style="background-image: url('../assets/comp_buttons.png')">
130 </div>
131 <span class="mdl-components__link-text">Buttons</span>
132 </a>
133
134 <a href="#cards-section" class="mdl-components__link mdl-component cards">
135 <div class="mdl-components__link-image"
136 style="background-image: url('../assets/comp_cards.png')">
137 </div>
138 <span class="mdl-components__link-text">Cards</span>
139 </a>
140
141 <a href="#chips-section" class="mdl-components__link mdl-component chips">
142 <div class="mdl-components__link-image"
143 style="background-image: url('../assets/comp_chips.png')">
144 </div>
145 <span class="mdl-components__link-text">Chips</span>
146 </a>
147
148 <a href="#dialog-section" class="mdl-components__link mdl-component dialog">
149 <div class="mdl-components__link-image"
150 style="background-image: url('../assets/comp_dialog.png')">
151 </div>
152 <span class="mdl-components__link-text">Dialogs</span>
153 </a>
154
155 <a href="#layout-section" class="mdl-components__link mdl-component layout">
156 <div class="mdl-components__link-image"
157 style="background-image: url('../assets/comp_layout.png')">
158 </div>
159 <span class="mdl-components__link-text">Layout</span>
160 </a>
161
162 <a href="#lists-section" class="mdl-components__link mdl-component lists">
163 <div class="mdl-components__link-image"
164 style="background-image: url('../assets/comp_lists.png')">
165 </div>
166 <span class="mdl-components__link-text">Lists</span>
167 </a>
168
169 <a href="#loading-section" class="mdl-components__link mdl-component loading">
170 <div class="mdl-components__link-image"
171 style="background-image: url('../assets/comp_loading.png')">
172 </div>
173 <span class="mdl-components__link-text">Loading</span>
174 </a>
175
176 <a href="#menus-section" class="mdl-components__link mdl-component menus">
177 <div class="mdl-components__link-image"
178 style="background-image: url('../assets/comp_menus.png')">
179 </div>
180 <span class="mdl-components__link-text">Menus</span>
181 </a>
182
183 <a href="#sliders-section" class="mdl-components__link mdl-component sliders">
184 <div class="mdl-components__link-image"
185 style="background-image: url('../assets/comp_sliders.png')">
186 </div>
187 <span class="mdl-components__link-text">Sliders</span>
188 </a>
189
190 <a href="#snackbar-section" class="mdl-components__link mdl-component snackbar">
191 <div class="mdl-components__link-image"
192 style="background-image: url('../assets/comp_snackbar.png')">
193 </div>
194 <span class="mdl-components__link-text">Snackbar</span>
195 </a>
196
197 <a href="#toggles-section" class="mdl-components__link mdl-component toggles">
198 <div class="mdl-components__link-image"
199 style="background-image: url('../assets/comp_toggles.png')">
200 </div>
201 <span class="mdl-components__link-text">Toggles</span>
202 </a>
203
204 <a href="#tables-section" class="mdl-components__link mdl-component tables">
205 <div class="mdl-components__link-image"
206 style="background-image: url('../assets/comp_tables.png')">
207 </div>
208 <span class="mdl-components__link-text">Tables</span>
209 </a>
210
211 <a href="#textfields-section" class="mdl-components__link mdl-component textfields">
212 <div class="mdl-components__link-image"
213 style="background-image: url('../assets/comp_textfields.png')">
214 </div>
215 <span class="mdl-components__link-text">Text Fields</span>
216 </a>
217
218 <a href="#tooltips-section" class="mdl-components__link mdl-component tooltips">
219 <div class="mdl-components__link-image"
220 style="background-image: url('../assets/comp_tooltips.png')">
221 </div>
222 <span class="mdl-components__link-text">Tooltips</span>
223 </a>
224
225 </aside>
226 <main class="mdl-components__pages">
227 <section id="index-section" class="mdl-components-index mdl-components__page">
228 <div class="mdl-components-index-text mdl-grid">
229 <div class="mdl-components-text docs-text-styling about-panel about-panel--text mdl-cell mdl-cell--12-col">
230 <dl class="mdl-components-dl">
231 <dt class="mdl-components-dt">COMPONENTS</dt>
232 <dd class="mdl_components-dd">
233 Material Design Lite (MDL) is a library of components for web developers
234 based on Google's Material Design Philosophy: "A visual language for our
235 users that synthesizes the classic principles of good design with the
236 innovation and possibility of technology and science." Understanding the
237 goals and principles of Material Design is critical to the proper use of
238 the Material Design Lite components. If you have not yet read the
239 <a href="http://www.google.com/design/spec/material-design/introduction.html">Material Design Introduction</a>
240 you should do so before attempting to use the components.
241 </dd>
242 </dl>
243 </div>
244 </div>
245 <div class="mdl-components-img"></div>
246 </section>
247
248 <section id="badges-section" class="mdl-components__page mdl-grid">
249 <div class="mdl-cell mdl-cell--12-col">
250 <div class="docs-text-styling component-title">
251 <h3>Badges</h3>
252 <p>Small status descriptors for UI elements.</p>
253 </div>
254
255
256
257
258
259
260 <!-- Add warning, if the component has one -->
261
262 <!-- Generating snippets -->
263
264
265
266<div class="snippet-group">
267
268 <div class="snippet-header">
269 <div class="snippet-demos">
270 <div class="snippet-demo-padding"></div>
271
272
273
274
275 <div class="snippet-demo">
276 <div class="snippet-demo-container demo-badge demo-badge__badge-on-icon-text">
277 <style>
278.demo-badge__badge-on-icon-text .mdl-badge {
279 color: rgba(0, 0, 0, 0.24);
280}
281.demo-badge__badge-on-icon-text .mdl-badge.material-icons {
282 font-size: 32px;
283}
284</style>
285<!-- Number badge on icon -->
286<div class="material-icons mdl-badge mdl-badge--overlap" data-badge="1">account_box</div>
287
288
289 </div>
290 </div>
291
292
293
294 <div class="snippet-demo">
295 <div class="snippet-demo-container demo-badge demo-badge__badge-on-icon-icon">
296 <style>
297.demo-badge__badge-on-icon-icon .mdl-badge {
298 color: rgba(0, 0, 0, 0.24);
299}
300.demo-badge__badge-on-icon-icon .mdl-badge.material-icons {
301 font-size: 32px;
302}
303</style>
304<!-- Icon badge on icon -->
305<div class="material-icons mdl-badge mdl-badge--overlap" data-badge="♥">account_box</div>
306
307
308 </div>
309 </div>
310 <div class="snippet-demo-padding"></div>
311 </div>
312 <div class="snippet-captions">
313 <div class="snippet-caption-padding"></div>
314
315 <div class="snippet-caption">
316 Number
317 </div>
318 <div class="snippet-caption">
319 Icon
320 </div>
321 <div class="snippet-caption-padding"></div>
322 </div>
323 </div>
324 <div class="snippet-code">
325 <pre class="language-markup codepen-button-enabled"><code id="badge/badge-on-icon-text.html">&lt;!-- Number badge on icon --&gt;
326&lt;div class=&quot;material-icons mdl-badge mdl-badge--overlap&quot; data-badge=&quot;1&quot;&gt;account_box&lt;/div&gt;
327</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="badge/badge-on-icon-icon.html">&lt;!-- Icon badge on icon --&gt;
328&lt;div class=&quot;material-icons mdl-badge mdl-badge--overlap&quot; data-badge=&quot;♥&quot;&gt;account_box&lt;/div&gt;
329</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
330body {
331 padding: 20px;
332 background: #fafafa;
333 position: relative;
334}
335&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
336 </div>
337</div>
338
339
340
341
342<div class="snippet-group">
343
344 <div class="snippet-header">
345 <div class="snippet-demos">
346 <div class="snippet-demo-padding"></div>
347
348
349
350
351 <div class="snippet-demo">
352 <div class="snippet-demo-container demo-badge demo-badge__badge-on-text-text">
353 <style>
354.demo-badge__badge-on-text-text .mdl-badge {
355 color: rgba(0, 0, 0, 0.24);
356}
357</style>
358
359<!-- Number badge -->
360<span class="mdl-badge" data-badge="4">Inbox</span>
361
362
363 </div>
364 </div>
365
366
367
368 <div class="snippet-demo">
369 <div class="snippet-demo-container demo-badge demo-badge__badge-on-text-icon">
370 <style>
371.demo-badge__badge-on-text-icon .mdl-badge {
372 color: rgba(0, 0, 0, 0.24);
373}
374</style>
375<!-- Icon badge -->
376<span class="mdl-badge" data-badge="♥">Mood</span>
377
378
379 </div>
380 </div>
381 <div class="snippet-demo-padding"></div>
382 </div>
383 <div class="snippet-captions">
384 <div class="snippet-caption-padding"></div>
385
386 <div class="snippet-caption">
387 Number
388 </div>
389 <div class="snippet-caption">
390 Icon
391 </div>
392 <div class="snippet-caption-padding"></div>
393 </div>
394 </div>
395 <div class="snippet-code">
396 <pre class="language-markup codepen-button-enabled"><code id="badge/badge-on-text-text.html">&lt;!-- Number badge --&gt;
397&lt;span class=&quot;mdl-badge&quot; data-badge=&quot;4&quot;&gt;Inbox&lt;/span&gt;
398</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="badge/badge-on-text-icon.html">&lt;!-- Icon badge --&gt;
399&lt;span class=&quot;mdl-badge&quot; data-badge=&quot;♥&quot;&gt;Mood&lt;/span&gt;
400</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
401body {
402 padding: 20px;
403 background: #fafafa;
404 position: relative;
405}
406&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
407 </div>
408</div>
409
410
411 <!-- Adding the demo page -->
412
413 <style>
414
415 </style>
416
417 <script>
418
419 </script>
420
421
422 <div class="docs-text-styling docs-readme">
423
424
425
426
427<h2 id="introduction">Introduction</h2>
428<p>The Material Design Lite (MDL) <strong>badge</strong> component is an onscreen notification element. A badge consists of a small circle, typically containing a number or other characters, that appears in proximity to another object. A badge can be both a notifier that there are additional items associated with an object and an indicator of how many items there are.</p>
429<p>You can use a badge to unobtrusively draw the user&#39;s attention to items they might not otherwise notice, or to emphasize that items may need their attention. For example:</p>
430<ul>
431<li>A &quot;New messages&quot; notification might be followed by a badge containing the number of unread messages.</li>
432<li>A &quot;You have unpurchased items in your shopping cart&quot; reminder might include a badge showing the number of items in the cart.</li>
433<li>A &quot;Join the discussion!&quot; button might have an accompanying badge indicating the number of users currently participating in the discussion.</li>
434</ul>
435<p>A badge is almost always positioned near a link so that the user has a convenient way to access the additional information indicated by the badge. However, depending on the intent, the badge itself may or may not be part of the link.</p>
436<p>Badges are a new feature in user interfaces, and provide users with a visual clue to help them discover additional relevant content. Their design and use is therefore an important factor in the overall user experience.</p>
437<h3 id="to-include-an-mdl-badge-component-">To include an MDL <strong>badge</strong> component:</h3>
438<p>&nbsp;1. Code an <code>&lt;a&gt;</code> (anchor/link) or a <code>&lt;span&gt;</code> element. Include any desired attributes and content.</p>
439<pre><code class="language-markup">&lt;a href=&quot;#&quot;&gt;This link has a badge.&lt;/a&gt;
440</code></pre>
441<p>&nbsp;2. Add one or more MDL classes, separated by spaces, to the element using the <code>class</code> attribute.</p>
442<pre><code class="language-markup">&lt;a href=&quot;#&quot; class=&quot;mdl-badge&quot;&gt;This link has a badge.&lt;/a&gt;
443</code></pre>
444<p>&nbsp;3. Add a <code>data-badge</code> attribute and quoted string value for the badge.</p>
445<pre><code class="language-markup">&lt;a href=&quot;#&quot; class=&quot;mdl-badge&quot; data-badge=&quot;5&quot;&gt;This link has a badge.&lt;/a&gt;
446</code></pre>
447<p>The badge component is ready for use.</p>
448<blockquote>
449<p><strong>Note:</strong> Because of the badge component&#39;s small size, the <code>data-badge</code> value should typically contain one to three characters. More than three characters will not cause an error, but some characters may fall outside the badge and thus be difficult or impossible to see. The value of the <code>data-badge</code> attribute is centered in the badge.</p>
450</blockquote>
451<h4 id="examples">Examples</h4>
452<p>A badge inside a link.</p>
453<pre><code class="language-markup">&lt;a href=&quot;#&quot; class=&quot;mdl-badge&quot; data-badge=&quot;7&quot;&gt;This link contains a badge.&lt;/a&gt;
454</code></pre>
455<p>A badge near, but not included in, a link.</p>
456<pre><code class="language-markup">&lt;a href=&quot;#&quot;&gt;This link is followed by a badge.&lt;/a&gt;
457&lt;span class=&quot;mdl-badge&quot; data-badge=&quot;12&quot;&gt;&lt;/span&gt;
458</code></pre>
459<p>A badge inside a link with too many characters to fit inside the badge.</p>
460<pre><code class="language-markup">&lt;a href=&quot;#&quot; class=&quot;mdl-badge&quot; data-badge=&quot;123456789&quot;&gt;
461This badge has too many characters.&lt;/a&gt;
462</code></pre>
463<p>A badge inside a link with no badge background color.</p>
464<pre><code class="language-markup">&lt;a href=&quot;#&quot; class=&quot;mdl-badge mdl-badge--no-background&quot; data-badge=&quot;123&quot;&gt;
465This badge has no background color.&lt;/a&gt;
466</code></pre>
467<h2 id="configuration-options">Configuration options</h2>
468<p>The MDL CSS classes apply various predefined visual enhancements to the badge. The table below lists the available classes and their effects.</p>
469<table>
470<thead>
471<tr>
472<th>MDL class</th>
473<th>Effect</th>
474<th>Remarks</th>
475</tr>
476</thead>
477<tbody>
478<tr>
479<td><code>mdl-badge</code></td>
480<td>Defines badge as an MDL component</td>
481<td>Required on span or link</td>
482</tr>
483<tr>
484<td><code>mdl-badge--no-background</code></td>
485<td>Applies open-circle effect to badge</td>
486<td>Optional</td>
487</tr>
488<tr>
489<td><code>mdl-badge--overlap</code></td>
490<td>Make the badge overlap with its container</td>
491<td>Optional</td>
492</tr>
493<tr>
494<td><code>data-badge=&quot;value&quot;</code></td>
495<td>Assigns string value to badge</td>
496<td>Not a class, but a separate attribute; required on span or link</td>
497</tr>
498</tbody>
499</table>
500
501
502
503 </div>
504
505 </div>
506 </section>
507 <section id="buttons-section" class="mdl-components__page mdl-grid">
508 <div class="mdl-cell mdl-cell--12-col">
509 <div class="docs-text-styling component-title">
510 <h3>Buttons</h3>
511 <p>Variations on Material Design buttons.</p>
512 </div>
513
514
515
516
517
518
519 <!-- Add warning, if the component has one -->
520
521 <!-- Generating snippets -->
522
523
524
525<div class="snippet-group">
526
527 <div class="snippet-header">
528 <div class="snippet-demos">
529 <div class="snippet-demo-padding"></div>
530
531
532
533
534 <div class="snippet-demo">
535 <div class="snippet-demo-container demo-button demo-button__fab-colored">
536 <!-- Colored FAB button -->
537<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
538 <i class="material-icons">add</i>
539</button>
540
541 </div>
542 </div>
543
544
545
546 <div class="snippet-demo">
547 <div class="snippet-demo-container demo-button demo-button__fab-colored-ripple">
548 <!-- Colored FAB button with ripple -->
549<button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
550 <i class="material-icons">add</i>
551</button>
552
553 </div>
554 </div>
555 <div class="snippet-demo-padding"></div>
556 </div>
557 <div class="snippet-captions">
558 <div class="snippet-caption-padding"></div>
559
560 <div class="snippet-caption">
561 Colored FAB
562 </div>
563 <div class="snippet-caption">
564 With ripple
565 </div>
566 <div class="snippet-caption-padding"></div>
567 </div>
568 </div>
569 <div class="snippet-code">
570 <pre class="language-markup codepen-button-enabled"><code id="button/fab-colored.html">&lt;!-- Colored FAB button --&gt;
571&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab mdl-button--colored&quot;&gt;
572 &lt;i class=&quot;material-icons&quot;&gt;add&lt;/i&gt;
573&lt;/button&gt;
574</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/fab-colored-ripple.html">&lt;!-- Colored FAB button with ripple --&gt;
575&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored&quot;&gt;
576 &lt;i class=&quot;material-icons&quot;&gt;add&lt;/i&gt;
577&lt;/button&gt;
578</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
579body {
580 padding: 20px;
581 background: #fafafa;
582 position: relative;
583}
584&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
585 </div>
586</div>
587
588
589
590
591<div class="snippet-group">
592
593 <div class="snippet-header">
594 <div class="snippet-demos">
595 <div class="snippet-demo-padding"></div>
596
597
598
599
600 <div class="snippet-demo">
601 <div class="snippet-demo-container demo-button demo-button__fab">
602 <!-- FAB button -->
603<button class="mdl-button mdl-js-button mdl-button--fab">
604 <i class="material-icons">add</i>
605</button>
606
607 </div>
608 </div>
609
610
611
612 <div class="snippet-demo">
613 <div class="snippet-demo-container demo-button demo-button__fab-ripple">
614 <!-- FAB button with ripple -->
615<button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect">
616 <i class="material-icons">add</i>
617</button>
618
619 </div>
620 </div>
621
622
623
624 <div class="snippet-demo">
625 <div class="snippet-demo-container demo-button demo-button__fab-disabled">
626 <!-- Disabled FAB button -->
627<button class="mdl-button mdl-js-button mdl-button--fab" disabled>
628 <i class="material-icons">add</i>
629</button>
630
631 </div>
632 </div>
633 <div class="snippet-demo-padding"></div>
634 </div>
635 <div class="snippet-captions">
636 <div class="snippet-caption-padding"></div>
637
638 <div class="snippet-caption">
639 Plain FAB
640 </div>
641 <div class="snippet-caption">
642 With ripple
643 </div>
644 <div class="snippet-caption">
645 Disabled
646 </div>
647 <div class="snippet-caption-padding"></div>
648 </div>
649 </div>
650 <div class="snippet-code">
651 <pre class="language-markup codepen-button-enabled"><code id="button/fab.html">&lt;!-- FAB button --&gt;
652&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab&quot;&gt;
653 &lt;i class=&quot;material-icons&quot;&gt;add&lt;/i&gt;
654&lt;/button&gt;
655</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/fab-ripple.html">&lt;!-- FAB button with ripple --&gt;
656&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect&quot;&gt;
657 &lt;i class=&quot;material-icons&quot;&gt;add&lt;/i&gt;
658&lt;/button&gt;
659</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/fab-disabled.html">&lt;!-- Disabled FAB button --&gt;
660&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab&quot; disabled&gt;
661 &lt;i class=&quot;material-icons&quot;&gt;add&lt;/i&gt;
662&lt;/button&gt;
663</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
664body {
665 padding: 20px;
666 background: #fafafa;
667 position: relative;
668}
669&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
670 </div>
671</div>
672
673
674
675
676<div class="snippet-group">
677
678 <div class="snippet-header">
679 <div class="snippet-demos">
680 <div class="snippet-demo-padding"></div>
681
682
683
684
685 <div class="snippet-demo">
686 <div class="snippet-demo-container demo-button demo-button__raised">
687 <!-- Raised button -->
688<button class="mdl-button mdl-js-button mdl-button--raised">
689 Button
690</button>
691
692 </div>
693 </div>
694
695
696
697 <div class="snippet-demo">
698 <div class="snippet-demo-container demo-button demo-button__raised-ripple">
699 <!-- Raised button with ripple -->
700<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
701 Button
702</button>
703
704 </div>
705 </div>
706
707
708
709 <div class="snippet-demo">
710 <div class="snippet-demo-container demo-button demo-button__raised-disabled">
711 <!-- Raised disabled button -->
712<button class="mdl-button mdl-js-button mdl-button--raised" disabled>
713 Button
714</button>
715
716 </div>
717 </div>
718 <div class="snippet-demo-padding"></div>
719 </div>
720 <div class="snippet-captions">
721 <div class="snippet-caption-padding"></div>
722
723 <div class="snippet-caption">
724 Raised Button
725 </div>
726 <div class="snippet-caption">
727 With ripple
728 </div>
729 <div class="snippet-caption">
730 Disabled
731 </div>
732 <div class="snippet-caption-padding"></div>
733 </div>
734 </div>
735 <div class="snippet-code">
736 <pre class="language-markup codepen-button-enabled"><code id="button/raised.html">&lt;!-- Raised button --&gt;
737&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised&quot;&gt;
738 Button
739&lt;/button&gt;
740</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/raised-ripple.html">&lt;!-- Raised button with ripple --&gt;
741&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect&quot;&gt;
742 Button
743&lt;/button&gt;
744</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/raised-disabled.html">&lt;!-- Raised disabled button --&gt;
745&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised&quot; disabled&gt;
746 Button
747&lt;/button&gt;
748</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
749body {
750 padding: 20px;
751 background: #fafafa;
752 position: relative;
753}
754&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
755 </div>
756</div>
757
758
759
760
761<div class="snippet-group">
762
763 <div class="snippet-header">
764 <div class="snippet-demos">
765 <div class="snippet-demo-padding"></div>
766
767
768
769
770 <div class="snippet-demo">
771 <div class="snippet-demo-container demo-button demo-button__raised-colored">
772 <!-- Colored raised button -->
773<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
774 Button
775</button>
776
777 </div>
778 </div>
779
780
781
782 <div class="snippet-demo">
783 <div class="snippet-demo-container demo-button demo-button__raised-accent">
784 <!-- Accent-colored raised button -->
785<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">
786 Button
787</button>
788
789 </div>
790 </div>
791
792
793
794 <div class="snippet-demo">
795 <div class="snippet-demo-container demo-button demo-button__raised-ripple-accent">
796 <!-- Accent-colored raised button with ripple -->
797<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
798 Button
799</button>
800
801 </div>
802 </div>
803 <div class="snippet-demo-padding"></div>
804 </div>
805 <div class="snippet-captions">
806 <div class="snippet-caption-padding"></div>
807
808 <div class="snippet-caption">
809 Colored button
810 </div>
811 <div class="snippet-caption">
812 Accent colored
813 </div>
814 <div class="snippet-caption">
815 With Ripples
816 </div>
817 <div class="snippet-caption-padding"></div>
818 </div>
819 </div>
820 <div class="snippet-code">
821 <pre class="language-markup codepen-button-enabled"><code id="button/raised-colored.html">&lt;!-- Colored raised button --&gt;
822&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised mdl-button--colored&quot;&gt;
823 Button
824&lt;/button&gt;
825</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/raised-accent.html">&lt;!-- Accent-colored raised button --&gt;
826&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised mdl-button--accent&quot;&gt;
827 Button
828&lt;/button&gt;
829</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/raised-ripple-accent.html">&lt;!-- Accent-colored raised button with ripple --&gt;
830&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent&quot;&gt;
831 Button
832&lt;/button&gt;
833</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
834body {
835 padding: 20px;
836 background: #fafafa;
837 position: relative;
838}
839&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
840 </div>
841</div>
842
843
844
845
846<div class="snippet-group">
847
848 <div class="snippet-header">
849 <div class="snippet-demos">
850 <div class="snippet-demo-padding"></div>
851
852
853
854
855 <div class="snippet-demo">
856 <div class="snippet-demo-container demo-button demo-button__flat">
857 <!-- Flat button -->
858<button class="mdl-button mdl-js-button">
859 Button
860</button>
861
862 </div>
863 </div>
864
865
866
867 <div class="snippet-demo">
868 <div class="snippet-demo-container demo-button demo-button__flat-ripple">
869 <!-- Flat button with ripple -->
870<button class="mdl-button mdl-js-button mdl-js-ripple-effect">
871 Button
872</button>
873
874 </div>
875 </div>
876
877
878
879 <div class="snippet-demo">
880 <div class="snippet-demo-container demo-button demo-button__flat-disabled">
881 <!-- Disabled flat button -->
882<button class="mdl-button mdl-js-button" disabled>
883 Button
884</button>
885
886 </div>
887 </div>
888 <div class="snippet-demo-padding"></div>
889 </div>
890 <div class="snippet-captions">
891 <div class="snippet-caption-padding"></div>
892
893 <div class="snippet-caption">
894 Flat button
895 </div>
896 <div class="snippet-caption">
897 With ripple
898 </div>
899 <div class="snippet-caption">
900 Disabled
901 </div>
902 <div class="snippet-caption-padding"></div>
903 </div>
904 </div>
905 <div class="snippet-code">
906 <pre class="language-markup codepen-button-enabled"><code id="button/flat.html">&lt;!-- Flat button --&gt;
907&lt;button class=&quot;mdl-button mdl-js-button&quot;&gt;
908 Button
909&lt;/button&gt;
910</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/flat-ripple.html">&lt;!-- Flat button with ripple --&gt;
911&lt;button class=&quot;mdl-button mdl-js-button mdl-js-ripple-effect&quot;&gt;
912 Button
913&lt;/button&gt;
914</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/flat-disabled.html">&lt;!-- Disabled flat button --&gt;
915&lt;button class=&quot;mdl-button mdl-js-button&quot; disabled&gt;
916 Button
917&lt;/button&gt;
918</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
919body {
920 padding: 20px;
921 background: #fafafa;
922 position: relative;
923}
924&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
925 </div>
926</div>
927
928
929
930
931<div class="snippet-group">
932
933 <div class="snippet-header">
934 <div class="snippet-demos">
935 <div class="snippet-demo-padding"></div>
936
937
938
939
940 <div class="snippet-demo">
941 <div class="snippet-demo-container demo-button demo-button__flat-primary">
942 <!-- Primary-colored flat button -->
943<button class="mdl-button mdl-js-button mdl-button--primary">
944 Button
945</button>
946
947 </div>
948 </div>
949
950
951
952 <div class="snippet-demo">
953 <div class="snippet-demo-container demo-button demo-button__flat-accent">
954 <!-- Accent-colored flat button -->
955<button class="mdl-button mdl-js-button mdl-button--accent">
956 Button
957</button>
958
959 </div>
960 </div>
961 <div class="snippet-demo-padding"></div>
962 </div>
963 <div class="snippet-captions">
964 <div class="snippet-caption-padding"></div>
965
966 <div class="snippet-caption">
967 Primary colored flat
968 </div>
969 <div class="snippet-caption">
970 Accent colored flat
971 </div>
972 <div class="snippet-caption-padding"></div>
973 </div>
974 </div>
975 <div class="snippet-code">
976 <pre class="language-markup codepen-button-enabled"><code id="button/flat-primary.html">&lt;!-- Primary-colored flat button --&gt;
977&lt;button class=&quot;mdl-button mdl-js-button mdl-button--primary&quot;&gt;
978 Button
979&lt;/button&gt;
980</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/flat-accent.html">&lt;!-- Accent-colored flat button --&gt;
981&lt;button class=&quot;mdl-button mdl-js-button mdl-button--accent&quot;&gt;
982 Button
983&lt;/button&gt;
984</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
985body {
986 padding: 20px;
987 background: #fafafa;
988 position: relative;
989}
990&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
991 </div>
992</div>
993
994
995
996
997<div class="snippet-group">
998
999 <div class="snippet-header">
1000 <div class="snippet-demos">
1001 <div class="snippet-demo-padding"></div>
1002
1003
1004
1005
1006 <div class="snippet-demo">
1007 <div class="snippet-demo-container demo-button demo-button__icon">
1008 <!-- Icon button -->
1009<button class="mdl-button mdl-js-button mdl-button--icon">
1010 <i class="material-icons">mood</i>
1011</button>
1012
1013 </div>
1014 </div>
1015
1016
1017
1018 <div class="snippet-demo">
1019 <div class="snippet-demo-container demo-button demo-button__icon-colored">
1020 <!-- Colored icon button -->
1021<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored">
1022 <i class="material-icons">mood</i>
1023</button>
1024
1025 </div>
1026 </div>
1027 <div class="snippet-demo-padding"></div>
1028 </div>
1029 <div class="snippet-captions">
1030 <div class="snippet-caption-padding"></div>
1031
1032 <div class="snippet-caption">
1033 Icon button
1034 </div>
1035 <div class="snippet-caption">
1036 Colored
1037 </div>
1038 <div class="snippet-caption-padding"></div>
1039 </div>
1040 </div>
1041 <div class="snippet-code">
1042 <pre class="language-markup codepen-button-enabled"><code id="button/icon.html">&lt;!-- Icon button --&gt;
1043&lt;button class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
1044 &lt;i class=&quot;material-icons&quot;&gt;mood&lt;/i&gt;
1045&lt;/button&gt;
1046</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/icon-colored.html">&lt;!-- Colored icon button --&gt;
1047&lt;button class=&quot;mdl-button mdl-js-button mdl-button--icon mdl-button--colored&quot;&gt;
1048 &lt;i class=&quot;material-icons&quot;&gt;mood&lt;/i&gt;
1049&lt;/button&gt;
1050</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
1051body {
1052 padding: 20px;
1053 background: #fafafa;
1054 position: relative;
1055}
1056&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
1057 </div>
1058</div>
1059
1060
1061
1062
1063<div class="snippet-group">
1064
1065 <div class="snippet-header">
1066 <div class="snippet-demos">
1067 <div class="snippet-demo-padding"></div>
1068
1069
1070
1071
1072 <div class="snippet-demo">
1073 <div class="snippet-demo-container demo-button demo-button__fab-mini">
1074 <!-- Mini FAB button -->
1075<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab">
1076 <i class="material-icons">add</i>
1077</button>
1078
1079 </div>
1080 </div>
1081
1082
1083
1084 <div class="snippet-demo">
1085 <div class="snippet-demo-container demo-button demo-button__fab-mini-colored">
1086 <!-- Colored mini FAB button -->
1087<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored">
1088 <i class="material-icons">add</i>
1089</button>
1090
1091 </div>
1092 </div>
1093 <div class="snippet-demo-padding"></div>
1094 </div>
1095 <div class="snippet-captions">
1096 <div class="snippet-caption-padding"></div>
1097
1098 <div class="snippet-caption">
1099 Mini FAB
1100 </div>
1101 <div class="snippet-caption">
1102 Colored
1103 </div>
1104 <div class="snippet-caption-padding"></div>
1105 </div>
1106 </div>
1107 <div class="snippet-code">
1108 <pre class="language-markup codepen-button-enabled"><code id="button/fab-mini.html">&lt;!-- Mini FAB button --&gt;
1109&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab&quot;&gt;
1110 &lt;i class=&quot;material-icons&quot;&gt;add&lt;/i&gt;
1111&lt;/button&gt;
1112</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="button/fab-mini-colored.html">&lt;!-- Colored mini FAB button --&gt;
1113&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored&quot;&gt;
1114 &lt;i class=&quot;material-icons&quot;&gt;add&lt;/i&gt;
1115&lt;/button&gt;
1116</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
1117body {
1118 padding: 20px;
1119 background: #fafafa;
1120 position: relative;
1121}
1122&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
1123 </div>
1124</div>
1125
1126
1127 <!-- Adding the demo page -->
1128
1129 <style>
1130
1131 </style>
1132
1133 <script>
1134
1135 </script>
1136
1137
1138 <div class="docs-text-styling docs-readme">
1139
1140
1141
1142
1143<h2 id="introduction">Introduction</h2>
1144<p>The Material Design Lite (MDL) <strong>button</strong> component is an enhanced version of the standard HTML <code>&lt;button&gt;</code> element. A button consists of text and/or an image that clearly communicates what action will occur when the user clicks or touches it. The MDL button component provides various types of buttons, and allows you to add both display and click effects.</p>
1145<p>Buttons are a ubiquitous feature of most user interfaces, regardless of a site&#39;s content or function. Their design and use is therefore an important factor in the overall user experience. See the button component&#39;s <a href="http://www.google.com/design/spec/components/buttons.html">Material Design specifications page</a> for details.</p>
1146<p>The available button display types are <em>flat</em> (default), <em>raised</em>, <em>fab</em>, <em>mini-fab</em>, and <em>icon</em>; any of these types may be plain (light gray) or <em>colored</em>, and may be initially or programmatically <em>disabled</em>. The <em>fab</em>, <em>mini-fab</em>, and <em>icon</em> button types typically use a small image as their caption rather than text.</p>
1147<h3 id="to-include-an-mdl-button-component-">To include an MDL <strong>button</strong> component:</h3>
1148<p>&nbsp;1. Code a <code>&lt;button&gt;</code> element. Include any desired attributes and values, such as an id or event handler, and add a text caption or image as appropriate.</p>
1149<pre><code class="language-markup">&lt;button&gt;Save&lt;/button&gt;
1150</code></pre>
1151<p>&nbsp;2. Add one or more MDL classes, separated by spaces, to the button using the <code>class</code> attribute.</p>
1152<pre><code class="language-markup">&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised&quot;&gt;Save&lt;/button&gt;
1153</code></pre>
1154<p>The button component is ready for use.</p>
1155<h4 id="examples">Examples</h4>
1156<p>A button with the &quot;raised&quot; effect.</p>
1157<pre><code class="language-markup">&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised&quot;&gt;Save&lt;/button&gt;
1158</code></pre>
1159<p>A button with the &quot;fab&quot; effect.</p>
1160<pre><code class="language-markup">&lt;button class=&quot;mdl-button mdl-js-button mdl-button--fab&quot;&gt;OK&lt;/button&gt;
1161</code></pre>
1162<p>A button with the &quot;icon&quot; and &quot;colored&quot; effects.</p>
1163<pre><code class="language-markup">&lt;button class=&quot;mdl-button mdl-js-button mdl-button--icon mdl-button--colored&quot;&gt;?&lt;/button&gt;
1164</code></pre>
1165<h2 id="configuration-options">Configuration options</h2>
1166<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the button. The table below lists the available classes and their effects.</p>
1167<table>
1168<thead>
1169<tr>
1170<th>MDL class</th>
1171<th>Effect</th>
1172<th>Remarks</th>
1173</tr>
1174</thead>
1175<tbody>
1176<tr>
1177<td><code>mdl-button</code></td>
1178<td>Defines button as an MDL component</td>
1179<td>Required</td>
1180</tr>
1181<tr>
1182<td><code>mdl-js-button</code></td>
1183<td>Assigns basic MDL behavior to button</td>
1184<td>Required</td>
1185</tr>
1186<tr>
1187<td>(none)</td>
1188<td>Applies <em>flat</em> display effect to button (default)</td>
1189<td></td>
1190</tr>
1191<tr>
1192<td><code>mdl-button--raised</code></td>
1193<td>Applies <em>raised</em> display effect</td>
1194<td>Mutually exclusive with <em>fab</em>, <em>mini-fab</em>, and <em>icon</em></td>
1195</tr>
1196<tr>
1197<td><code>mdl-button--fab</code></td>
1198<td>Applies <em>fab</em> (circular) display effect</td>
1199<td>Mutually exclusive with <em>raised</em>, <em>mini-fab</em>, and <em>icon</em></td>
1200</tr>
1201<tr>
1202<td><code>mdl-button--mini-fab</code></td>
1203<td>Applies <em>mini-fab</em> (small fab circular) display effect</td>
1204<td>Mutually exclusive with <em>raised</em>, <em>fab</em>, and <em>icon</em></td>
1205</tr>
1206<tr>
1207<td><code>mdl-button--icon</code></td>
1208<td>Applies <em>icon</em> (small plain circular) display effect</td>
1209<td>Mutually exclusive with <em>raised</em>, <em>fab</em>, and <em>mini-fab</em></td>
1210</tr>
1211<tr>
1212<td><code>mdl-button--colored</code></td>
1213<td>Applies <em>colored</em> display effect (primary or accent color, depending on the type of button)</td>
1214<td>Colors are defined in <code>material.min.css</code></td>
1215</tr>
1216<tr>
1217<td><code>mdl-button--primary</code></td>
1218<td>Applies <em>primary</em> color display effect</td>
1219<td>Colors are defined in <code>material.min.css</code></td>
1220</tr>
1221<tr>
1222<td><code>mdl-button--accent</code></td>
1223<td>Applies <em>accent</em> color display effect</td>
1224<td>Colors are defined in <code>material.min.css</code></td>
1225</tr>
1226<tr>
1227<td><code>mdl-js-ripple-effect</code></td>
1228<td>Applies <em>ripple</em> click effect</td>
1229<td>May be used in combination with any other classes</td>
1230</tr>
1231</tbody>
1232</table>
1233<blockquote>
1234<p><strong>Note:</strong> Disabled versions of all the available button types are provided, and are invoked with the standard HTML boolean attribute <code>disabled</code>. <code>&lt;button class=&quot;mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect&quot; disabled&gt;Raised Ripples Disabled&lt;/button&gt;</code>. Alternatively, the <code>mdl-button--disabled</code> class can be used to achieve the same style but it does not disable the functionality of the element.
1235This attribute may be added or removed programmatically via scripting.</p>
1236</blockquote>
1237
1238
1239
1240 </div>
1241
1242 </div>
1243 </section>
1244 <section id="cards-section" class="mdl-components__page mdl-grid">
1245 <div class="mdl-cell mdl-cell--12-col">
1246 <div class="docs-text-styling component-title">
1247 <h3>Cards</h3>
1248 <p>Self-contained pieces of paper with data.</p>
1249 </div>
1250
1251
1252
1253
1254
1255
1256 <!-- Add warning, if the component has one -->
1257
1258 <!-- Generating snippets -->
1259
1260
1261
1262<div class="snippet-group">
1263
1264 <div class="snippet-header">
1265 <div class="snippet-demos">
1266 <div class="snippet-demo-padding"></div>
1267
1268
1269
1270
1271 <div class="snippet-demo">
1272 <div class="snippet-demo-container demo-card demo-card__wide">
1273 <!-- Wide card with share menu button -->
1274<style>
1275.demo-card-wide.mdl-card {
1276 width: 512px;
1277}
1278.demo-card-wide > .mdl-card__title {
1279 color: #fff;
1280 height: 176px;
1281 background: url('../assets/demos/welcome_card.jpg') center / cover;
1282}
1283.demo-card-wide > .mdl-card__menu {
1284 color: #fff;
1285}
1286</style>
1287
1288<div class="demo-card-wide mdl-card mdl-shadow--2dp">
1289 <div class="mdl-card__title">
1290 <h2 class="mdl-card__title-text">Welcome</h2>
1291 </div>
1292 <div class="mdl-card__supporting-text">
1293 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
1294 Mauris sagittis pellentesque lacus eleifend lacinia...
1295 </div>
1296 <div class="mdl-card__actions mdl-card--border">
1297 <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
1298 Get Started
1299 </a>
1300 </div>
1301 <div class="mdl-card__menu">
1302 <button class="mdl-button mdl-button--icon mdl-js-button mdl-js-ripple-effect">
1303 <i class="material-icons">share</i>
1304 </button>
1305 </div>
1306</div>
1307
1308 </div>
1309 </div>
1310 <div class="snippet-demo-padding"></div>
1311 </div>
1312 <div class="snippet-captions">
1313 <div class="snippet-caption-padding"></div>
1314
1315 <div class="snippet-caption">
1316 Wide
1317 </div>
1318 <div class="snippet-caption-padding"></div>
1319 </div>
1320 </div>
1321 <div class="snippet-code">
1322 <pre class="language-markup codepen-button-enabled"><code id="card/wide.html">&lt;!-- Wide card with share menu button --&gt;
1323&lt;style&gt;
1324.demo-card-wide.mdl-card {
1325 width: 512px;
1326}
1327.demo-card-wide &gt; .mdl-card__title {
1328 color: #fff;
1329 height: 176px;
1330 background: url(&#39;../assets/demos/welcome_card.jpg&#39;) center / cover;
1331}
1332.demo-card-wide &gt; .mdl-card__menu {
1333 color: #fff;
1334}
1335&lt;/style&gt;
1336
1337&lt;div class=&quot;demo-card-wide mdl-card mdl-shadow--2dp&quot;&gt;
1338 &lt;div class=&quot;mdl-card__title&quot;&gt;
1339 &lt;h2 class=&quot;mdl-card__title-text&quot;&gt;Welcome&lt;/h2&gt;
1340 &lt;/div&gt;
1341 &lt;div class=&quot;mdl-card__supporting-text&quot;&gt;
1342 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
1343 Mauris sagittis pellentesque lacus eleifend lacinia...
1344 &lt;/div&gt;
1345 &lt;div class=&quot;mdl-card__actions mdl-card--border&quot;&gt;
1346 &lt;a class=&quot;mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect&quot;&gt;
1347 Get Started
1348 &lt;/a&gt;
1349 &lt;/div&gt;
1350 &lt;div class=&quot;mdl-card__menu&quot;&gt;
1351 &lt;button class=&quot;mdl-button mdl-button--icon mdl-js-button mdl-js-ripple-effect&quot;&gt;
1352 &lt;i class=&quot;material-icons&quot;&gt;share&lt;/i&gt;
1353 &lt;/button&gt;
1354 &lt;/div&gt;
1355&lt;/div&gt;
1356</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
1357body {
1358 padding: 20px;
1359 background: #fafafa;
1360 position: relative;
1361}
1362&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
1363 </div>
1364</div>
1365
1366
1367
1368
1369<div class="snippet-group">
1370
1371 <div class="snippet-header">
1372 <div class="snippet-demos">
1373 <div class="snippet-demo-padding"></div>
1374
1375
1376
1377
1378 <div class="snippet-demo">
1379 <div class="snippet-demo-container demo-card demo-card__square">
1380 <!-- Square card -->
1381<style>
1382.demo-card-square.mdl-card {
1383 width: 320px;
1384 height: 320px;
1385}
1386.demo-card-square > .mdl-card__title {
1387 color: #fff;
1388 background:
1389 url('../assets/demos/dog.png') bottom right 15% no-repeat #46B6AC;
1390}
1391</style>
1392
1393<div class="demo-card-square mdl-card mdl-shadow--2dp">
1394 <div class="mdl-card__title mdl-card--expand">
1395 <h2 class="mdl-card__title-text">Update</h2>
1396 </div>
1397 <div class="mdl-card__supporting-text">
1398 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
1399 Aenan convallis.
1400 </div>
1401 <div class="mdl-card__actions mdl-card--border">
1402 <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
1403 View Updates
1404 </a>
1405 </div>
1406</div>
1407
1408 </div>
1409 </div>
1410 <div class="snippet-demo-padding"></div>
1411 </div>
1412 <div class="snippet-captions">
1413 <div class="snippet-caption-padding"></div>
1414
1415 <div class="snippet-caption">
1416 Square
1417 </div>
1418 <div class="snippet-caption-padding"></div>
1419 </div>
1420 </div>
1421 <div class="snippet-code">
1422 <pre class="language-markup codepen-button-enabled"><code id="card/square.html">&lt;!-- Square card --&gt;
1423&lt;style&gt;
1424.demo-card-square.mdl-card {
1425 width: 320px;
1426 height: 320px;
1427}
1428.demo-card-square &gt; .mdl-card__title {
1429 color: #fff;
1430 background:
1431 url(&#39;../assets/demos/dog.png&#39;) bottom right 15% no-repeat #46B6AC;
1432}
1433&lt;/style&gt;
1434
1435&lt;div class=&quot;demo-card-square mdl-card mdl-shadow--2dp&quot;&gt;
1436 &lt;div class=&quot;mdl-card__title mdl-card--expand&quot;&gt;
1437 &lt;h2 class=&quot;mdl-card__title-text&quot;&gt;Update&lt;/h2&gt;
1438 &lt;/div&gt;
1439 &lt;div class=&quot;mdl-card__supporting-text&quot;&gt;
1440 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
1441 Aenan convallis.
1442 &lt;/div&gt;
1443 &lt;div class=&quot;mdl-card__actions mdl-card--border&quot;&gt;
1444 &lt;a class=&quot;mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect&quot;&gt;
1445 View Updates
1446 &lt;/a&gt;
1447 &lt;/div&gt;
1448&lt;/div&gt;
1449</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
1450body {
1451 padding: 20px;
1452 background: #fafafa;
1453 position: relative;
1454}
1455&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
1456 </div>
1457</div>
1458
1459
1460
1461
1462<div class="snippet-group">
1463
1464 <div class="snippet-header">
1465 <div class="snippet-demos">
1466 <div class="snippet-demo-padding"></div>
1467
1468
1469
1470
1471 <div class="snippet-demo">
1472 <div class="snippet-demo-container demo-card demo-card__image">
1473 <!-- Image card -->
1474<style>
1475.demo-card-image.mdl-card {
1476 width: 256px;
1477 height: 256px;
1478 background: url('../assets/demos/image_card.jpg') center / cover;
1479}
1480.demo-card-image > .mdl-card__actions {
1481 height: 52px;
1482 padding: 16px;
1483 background: rgba(0, 0, 0, 0.2);
1484}
1485.demo-card-image__filename {
1486 color: #fff;
1487 font-size: 14px;
1488 font-weight: 500;
1489}
1490</style>
1491
1492<div class="demo-card-image mdl-card mdl-shadow--2dp">
1493 <div class="mdl-card__title mdl-card--expand"></div>
1494 <div class="mdl-card__actions">
1495 <span class="demo-card-image__filename">Image.jpg</span>
1496 </div>
1497</div>
1498
1499 </div>
1500 </div>
1501
1502
1503
1504 <div class="snippet-demo">
1505 <div class="snippet-demo-container demo-card demo-card__event">
1506 <!-- Event card -->
1507<style>
1508.demo-card-event.mdl-card {
1509 width: 256px;
1510 height: 256px;
1511 background: #3E4EB8;
1512}
1513.demo-card-event > .mdl-card__actions {
1514 border-color: rgba(255, 255, 255, 0.2);
1515}
1516.demo-card-event > .mdl-card__title {
1517 align-items: flex-start;
1518}
1519.demo-card-event > .mdl-card__title > h4 {
1520 margin-top: 0;
1521}
1522.demo-card-event > .mdl-card__actions {
1523 display: flex;
1524 box-sizing:border-box;
1525 align-items: center;
1526}
1527.demo-card-event > .mdl-card__actions > .material-icons {
1528 padding-right: 10px;
1529}
1530.demo-card-event > .mdl-card__title,
1531.demo-card-event > .mdl-card__actions,
1532.demo-card-event > .mdl-card__actions > .mdl-button {
1533 color: #fff;
1534}
1535</style>
1536
1537<div class="demo-card-event mdl-card mdl-shadow--2dp">
1538 <div class="mdl-card__title mdl-card--expand">
1539 <h4>
1540 Featured event:<br>
1541 May 24, 2016<br>
1542 7-11pm
1543 </h4>
1544 </div>
1545 <div class="mdl-card__actions mdl-card--border">
1546 <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
1547 Add to Calendar
1548 </a>
1549 <div class="mdl-layout-spacer"></div>
1550 <i class="material-icons">event</i>
1551 </div>
1552</div>
1553
1554 </div>
1555 </div>
1556 <div class="snippet-demo-padding"></div>
1557 </div>
1558 <div class="snippet-captions">
1559 <div class="snippet-caption-padding"></div>
1560
1561 <div class="snippet-caption">
1562 Image
1563 </div>
1564 <div class="snippet-caption">
1565 Event
1566 </div>
1567 <div class="snippet-caption-padding"></div>
1568 </div>
1569 </div>
1570 <div class="snippet-code">
1571 <pre class="language-markup codepen-button-enabled"><code id="card/image.html">&lt;!-- Image card --&gt;
1572&lt;style&gt;
1573.demo-card-image.mdl-card {
1574 width: 256px;
1575 height: 256px;
1576 background: url(&#39;../assets/demos/image_card.jpg&#39;) center / cover;
1577}
1578.demo-card-image &gt; .mdl-card__actions {
1579 height: 52px;
1580 padding: 16px;
1581 background: rgba(0, 0, 0, 0.2);
1582}
1583.demo-card-image__filename {
1584 color: #fff;
1585 font-size: 14px;
1586 font-weight: 500;
1587}
1588&lt;/style&gt;
1589
1590&lt;div class=&quot;demo-card-image mdl-card mdl-shadow--2dp&quot;&gt;
1591 &lt;div class=&quot;mdl-card__title mdl-card--expand&quot;&gt;&lt;/div&gt;
1592 &lt;div class=&quot;mdl-card__actions&quot;&gt;
1593 &lt;span class=&quot;demo-card-image__filename&quot;&gt;Image.jpg&lt;/span&gt;
1594 &lt;/div&gt;
1595&lt;/div&gt;
1596</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="card/event.html">&lt;!-- Event card --&gt;
1597&lt;style&gt;
1598.demo-card-event.mdl-card {
1599 width: 256px;
1600 height: 256px;
1601 background: #3E4EB8;
1602}
1603.demo-card-event &gt; .mdl-card__actions {
1604 border-color: rgba(255, 255, 255, 0.2);
1605}
1606.demo-card-event &gt; .mdl-card__title {
1607 align-items: flex-start;
1608}
1609.demo-card-event &gt; .mdl-card__title &gt; h4 {
1610 margin-top: 0;
1611}
1612.demo-card-event &gt; .mdl-card__actions {
1613 display: flex;
1614 box-sizing:border-box;
1615 align-items: center;
1616}
1617.demo-card-event &gt; .mdl-card__actions &gt; .material-icons {
1618 padding-right: 10px;
1619}
1620.demo-card-event &gt; .mdl-card__title,
1621.demo-card-event &gt; .mdl-card__actions,
1622.demo-card-event &gt; .mdl-card__actions &gt; .mdl-button {
1623 color: #fff;
1624}
1625&lt;/style&gt;
1626
1627&lt;div class=&quot;demo-card-event mdl-card mdl-shadow--2dp&quot;&gt;
1628 &lt;div class=&quot;mdl-card__title mdl-card--expand&quot;&gt;
1629 &lt;h4&gt;
1630 Featured event:&lt;br&gt;
1631 May 24, 2016&lt;br&gt;
1632 7-11pm
1633 &lt;/h4&gt;
1634 &lt;/div&gt;
1635 &lt;div class=&quot;mdl-card__actions mdl-card--border&quot;&gt;
1636 &lt;a class=&quot;mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect&quot;&gt;
1637 Add to Calendar
1638 &lt;/a&gt;
1639 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
1640 &lt;i class=&quot;material-icons&quot;&gt;event&lt;/i&gt;
1641 &lt;/div&gt;
1642&lt;/div&gt;
1643</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
1644body {
1645 padding: 20px;
1646 background: #fafafa;
1647 position: relative;
1648}
1649&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
1650 </div>
1651</div>
1652
1653
1654 <!-- Adding the demo page -->
1655
1656 <style>
1657
1658 </style>
1659
1660 <script>
1661
1662 </script>
1663
1664
1665 <div class="docs-text-styling docs-readme">
1666
1667
1668
1669
1670<h2 id="introduction">Introduction</h2>
1671<p>The Material Design Lite (MDL) <strong>card</strong> component is a user interface element representing a virtual piece of paper that contains related data &mdash; such as a photo, some text, and a link &mdash; that are all about a single subject.</p>
1672<p>Cards are a convenient means of coherently displaying related content that is composed of different types of objects. They are also well-suited for presenting similar objects whose size or supported actions can vary considerably, like photos with captions of variable length. Cards have a constant width and a variable height, depending on their content.</p>
1673<p>Cards are a fairly new feature in user interfaces, and allow users an access point to more complex and detailed information. Their design and use is an important factor in the overall user experience. See the card component&#39;s <a href="http://www.google.com/design/spec/components/cards.html">Material Design specifications page</a> for details.</p>
1674<h3 id="to-include-an-mdl-card-component-">To include an MDL <strong>card</strong> component:</h3>
1675<p>&nbsp;1. Code a <code>&lt;div&gt;</code> element; this is the &quot;outer&quot; container, intended to hold all of the card&#39;s content.</p>
1676<pre><code class="language-markup">&lt;div&gt;
1677&lt;/div&gt;
1678</code></pre>
1679<p>&nbsp;2. Inside the div, code one or more &quot;inner&quot; divs, one for each desired content block. A card containing a title, an image, some text, and an action bar would contain four &quot;inner&quot; divs, all siblings.</p>
1680<pre><code class="language-markup">&lt;div&gt;
1681 &lt;div&gt;
1682 ...
1683 &lt;/div&gt;
1684 &lt;div&gt;
1685 ...
1686 &lt;/div&gt;
1687 &lt;div&gt;
1688 ...
1689 &lt;/div&gt;
1690 &lt;div&gt;
1691 ...
1692 &lt;/div&gt;
1693&lt;/div&gt;
1694</code></pre>
1695<p>&nbsp;3. Add one or more MDL classes, separated by spaces, to the &quot;outer&quot; div and the &quot;inner&quot; divs (depending on their intended use) using the <code>class</code> attribute.</p>
1696<pre><code class="language-markup">&lt;div class=&quot;mdl-card&quot;&gt;
1697 &lt;div class=&quot;mdl-card__title&quot;&gt;
1698 ...
1699 &lt;/div&gt;
1700 &lt;div class=&quot;mdl-card__media&quot;&gt;
1701 ...
1702 &lt;/div&gt;
1703 &lt;div class=&quot;mdl-card__supporting-text&quot;&gt;
1704 ...
1705 &lt;/div&gt;
1706 &lt;div class=&quot;mdl-card__actions&quot;&gt;
1707 ...
1708 &lt;/div&gt;
1709&lt;/div&gt;
1710</code></pre>
1711<p>&nbsp;4. Add content to each &quot;inner&quot; div, again depending on its intended use, using standard HTML elements and, optionally, additional MDL classes.</p>
1712<pre><code class="language-markup">&lt;div class=&quot;mdl-card&quot;&gt;
1713 &lt;div class=&quot;mdl-card__title&quot;&gt;
1714 &lt;h2 class=&quot;mdl-card__title-text&quot;&gt;title Text Goes Here&lt;/h2&gt;
1715 &lt;/div&gt;
1716 &lt;div class=&quot;mdl-card__media&quot;&gt;
1717 &lt;img src=&quot;photo.jpg&quot; width=&quot;220&quot; height=&quot;140&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;padding:20px;&quot;&gt;
1718 &lt;/div&gt;
1719 &lt;div class=&quot;mdl-card__supporting-text&quot;&gt;
1720 This text might describe the photo and provide further information, such as where and
1721 when it was taken.
1722 &lt;/div&gt;
1723 &lt;div class=&quot;mdl-card__actions&quot;&gt;
1724 &lt;a href=&quot;(URL or function)&quot;&gt;Related Action&lt;/a&gt;
1725 &lt;/div&gt;
1726&lt;/div&gt;
1727</code></pre>
1728<p>The card component is ready for use.</p>
1729<h4 id="examples">Examples</h4>
1730<p>A card (no shadow) with a title, image, text, and action.</p>
1731<pre><code class="language-markup">&lt;div class=&quot;mdl-card&quot;&gt;
1732 &lt;div class=&quot;mdl-card__title&quot;&gt;
1733 &lt;h2 class=&quot;mdl-card__title-text&quot;&gt;Auckland Sky Tower&lt;br&gt;Auckland, New Zealand&lt;/h2&gt;
1734 &lt;/div&gt;
1735 &lt;div class=&quot;mdl-card__media&quot;&gt;
1736 &lt;img src=&quot;skytower.jpg&quot; width=&quot;173&quot; height=&quot;157&quot; border=&quot;0&quot; alt=&quot;&quot;
1737 style=&quot;padding:10px;&quot;&gt;
1738 &lt;/div&gt;
1739 &lt;div class=&quot;mdl-card__supporting-text&quot;&gt;
1740 The Sky Tower is an observation and telecommunications tower located in Auckland,
1741 New Zealand. It is 328 metres (1,076 ft) tall, making it the tallest man-made structure
1742 in the Southern Hemisphere.
1743 &lt;/div&gt;
1744 &lt;div class=&quot;mdl-card__actions&quot;&gt;
1745 &lt;a href=&quot;http://en.wikipedia.org/wiki/Sky_Tower_%28Auckland%29&quot;&gt;Wikipedia entry&lt;/a&gt;
1746 &lt;/div&gt;
1747&lt;/div&gt;
1748</code></pre>
1749<p>Card (level-3 shadow) with an image, caption, and text:</p>
1750<pre><code class="language-markup">&lt;div class=&quot;mdl-card mdl-shadow--4dp&quot;&gt;
1751 &lt;div class=&quot;mdl-card__media&quot;&gt;&lt;img src=&quot;skytower.jpg&quot; width=&quot;173&quot; height=&quot;157&quot; border=&quot;0&quot;
1752 alt=&quot;&quot; style=&quot;padding:10px;&quot;&gt;
1753 &lt;/div&gt;
1754 &lt;div class=&quot;mdl-card__supporting-text&quot;&gt;
1755 Auckland Sky Tower, taken March 24th, 2014
1756 &lt;/div&gt;
1757 &lt;div class=&quot;mdl-card__supporting-text&quot;&gt;
1758 The Sky Tower is an observation and telecommunications tower located in Auckland,
1759 New Zealand. It is 328 metres (1,076 ft) tall, making it the tallest man-made structure
1760 in the Southern Hemisphere.
1761 &lt;/div&gt;
1762&lt;/div&gt;
1763</code></pre>
1764<h2 id="configuration-options">Configuration options</h2>
1765<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the card. The table below lists the available classes and their effects.</p>
1766<table>
1767<thead>
1768<tr>
1769<th>MDL class</th>
1770<th>Effect</th>
1771<th>Remarks</th>
1772</tr>
1773</thead>
1774<tbody>
1775<tr>
1776<td><code>mdl-card</code></td>
1777<td>Defines div element as an MDL card container</td>
1778<td>Required on &quot;outer&quot; div</td>
1779</tr>
1780<tr>
1781<td><code>mdl-card--border</code></td>
1782<td>Adds a border to the card section that it&#39;s applied to</td>
1783<td>Used on the &quot;inner&quot; divs</td>
1784</tr>
1785<tr>
1786<td><code>mdl-shadow--2dp through mdl-shadow--16dp</code></td>
1787<td>Assigns variable shadow depths (2, 3, 4, 6, 8, or 16) to card</td>
1788<td>Optional, goes on &quot;outer&quot; div; if omitted, no shadow is present</td>
1789</tr>
1790<tr>
1791<td><code>mdl-card__title</code></td>
1792<td>Defines div as a card title container</td>
1793<td>Required on &quot;inner&quot; title div</td>
1794</tr>
1795<tr>
1796<td><code>mdl-card__title-text</code></td>
1797<td>Assigns appropriate text characteristics to card title</td>
1798<td>Required on head tag (H1 - H6) inside title div</td>
1799</tr>
1800<tr>
1801<td><code>mdl-card__subtitle-text</code></td>
1802<td>Assigns text characteristics to a card subtitle</td>
1803<td>Optional. Should be a child of the title element.</td>
1804</tr>
1805<tr>
1806<td><code>mdl-card__media</code></td>
1807<td>Defines div as a card media container</td>
1808<td>Required on &quot;inner&quot; media div</td>
1809</tr>
1810<tr>
1811<td><code>mdl-card__supporting-text</code></td>
1812<td>Defines div as a card body text container and assigns appropriate text characteristics to body text</td>
1813<td>Required on &quot;inner&quot; body text div; text goes directly inside the div with no intervening containers</td>
1814</tr>
1815<tr>
1816<td><code>mdl-card__actions</code></td>
1817<td>Defines div as a card actions container and assigns appropriate text characteristics to actions text</td>
1818<td>Required on &quot;inner&quot; actions div; content goes directly inside the div with no intervening containers</td>
1819</tr>
1820<tr>
1821<td><code>mdl-card__menu</code></td>
1822<td>Defines element as top right menu button</td>
1823<td>Optional. Should be a child of the <code>mdl-card</code> element.</td>
1824</tr>
1825</tbody>
1826</table>
1827
1828
1829
1830 </div>
1831
1832 </div>
1833 </section>
1834 <section id="chips-section" class="mdl-components__page mdl-grid">
1835 <div class="mdl-cell mdl-cell--12-col">
1836 <div class="docs-text-styling component-title">
1837 <h3>Chips</h3>
1838 <p>Represents complex entities in small blocks.</p>
1839 </div>
1840
1841
1842
1843
1844
1845
1846 <!-- Add warning, if the component has one -->
1847
1848 <!-- Generating snippets -->
1849
1850
1851
1852<div class="snippet-group">
1853
1854 <div class="snippet-header">
1855 <div class="snippet-demos">
1856 <div class="snippet-demo-padding"></div>
1857
1858
1859
1860
1861 <div class="snippet-demo">
1862 <div class="snippet-demo-container demo-chip demo-chip__basic">
1863 <!-- Basic Chip -->
1864<span class="mdl-chip">
1865 <span class="mdl-chip__text">Basic Chip</span>
1866</span>
1867 </div>
1868 </div>
1869
1870
1871
1872 <div class="snippet-demo">
1873 <div class="snippet-demo-container demo-chip demo-chip__deletable">
1874 <!-- Deletable Chip -->
1875<span class="mdl-chip mdl-chip--deletable">
1876 <span class="mdl-chip__text">Deletable Chip</span>
1877 <button type="button" class="mdl-chip__action"><i class="material-icons">cancel</i></button>
1878</span>
1879 </div>
1880 </div>
1881
1882
1883
1884 <div class="snippet-demo">
1885 <div class="snippet-demo-container demo-chip demo-chip__button">
1886 <!-- Button Chip -->
1887<button type="button" class="mdl-chip">
1888 <span class="mdl-chip__text">Button Chip</span>
1889</button>
1890 </div>
1891 </div>
1892 <div class="snippet-demo-padding"></div>
1893 </div>
1894 <div class="snippet-captions">
1895 <div class="snippet-caption-padding"></div>
1896
1897 <div class="snippet-caption">
1898 Basic Chip
1899 </div>
1900 <div class="snippet-caption">
1901 Deletable Chip
1902 </div>
1903 <div class="snippet-caption">
1904 Button Chip
1905 </div>
1906 <div class="snippet-caption-padding"></div>
1907 </div>
1908 </div>
1909 <div class="snippet-code">
1910 <pre class="language-markup codepen-button-enabled"><code id="chip/basic.html">&lt;!-- Basic Chip --&gt;
1911&lt;span class=&quot;mdl-chip&quot;&gt;
1912 &lt;span class=&quot;mdl-chip__text&quot;&gt;Basic Chip&lt;/span&gt;
1913&lt;/span&gt;</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="chip/deletable.html">&lt;!-- Deletable Chip --&gt;
1914&lt;span class=&quot;mdl-chip mdl-chip--deletable&quot;&gt;
1915 &lt;span class=&quot;mdl-chip__text&quot;&gt;Deletable Chip&lt;/span&gt;
1916 &lt;button type=&quot;button&quot; class=&quot;mdl-chip__action&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;cancel&lt;/i&gt;&lt;/button&gt;
1917&lt;/span&gt;</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="chip/button.html">&lt;!-- Button Chip --&gt;
1918&lt;button type=&quot;button&quot; class=&quot;mdl-chip&quot;&gt;
1919 &lt;span class=&quot;mdl-chip__text&quot;&gt;Button Chip&lt;/span&gt;
1920&lt;/button&gt;</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
1921body {
1922 padding: 20px;
1923 background: #fafafa;
1924 position: relative;
1925}
1926&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
1927 </div>
1928</div>
1929
1930
1931
1932
1933<div class="snippet-group">
1934
1935 <div class="snippet-header">
1936 <div class="snippet-demos">
1937 <div class="snippet-demo-padding"></div>
1938
1939
1940
1941
1942 <div class="snippet-demo">
1943 <div class="snippet-demo-container demo-chip demo-chip__contact">
1944 <!-- Contact Chip -->
1945<span class="mdl-chip mdl-chip--contact">
1946 <span class="mdl-chip__contact mdl-color--teal mdl-color-text--white">A</span>
1947 <span class="mdl-chip__text">Contact Chip</span>
1948</span>
1949
1950 </div>
1951 </div>
1952
1953
1954
1955 <div class="snippet-demo">
1956 <div class="snippet-demo-container demo-chip demo-chip__deletable-contact">
1957 <!-- Deletable Contact Chip -->
1958<span class="mdl-chip mdl-chip--contact mdl-chip--deletable">
1959 <img class="mdl-chip__contact" src="/templates/dashboard/images/user.jpg"></img>
1960 <span class="mdl-chip__text">Deletable Contact Chip</span>
1961 <a href="#" class="mdl-chip__action"><i class="material-icons">cancel</i></a>
1962</span>
1963 </div>
1964 </div>
1965 <div class="snippet-demo-padding"></div>
1966 </div>
1967 <div class="snippet-captions">
1968 <div class="snippet-caption-padding"></div>
1969
1970 <div class="snippet-caption">
1971 Contact Chip
1972 </div>
1973 <div class="snippet-caption">
1974 Deletable Contact Chip
1975 </div>
1976 <div class="snippet-caption-padding"></div>
1977 </div>
1978 </div>
1979 <div class="snippet-code">
1980 <pre class="language-markup codepen-button-enabled"><code id="chip/contact.html">&lt;!-- Contact Chip --&gt;
1981&lt;span class=&quot;mdl-chip mdl-chip--contact&quot;&gt;
1982 &lt;span class=&quot;mdl-chip__contact mdl-color--teal mdl-color-text--white&quot;&gt;A&lt;/span&gt;
1983 &lt;span class=&quot;mdl-chip__text&quot;&gt;Contact Chip&lt;/span&gt;
1984&lt;/span&gt;
1985</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="chip/deletable-contact.html">&lt;!-- Deletable Contact Chip --&gt;
1986&lt;span class=&quot;mdl-chip mdl-chip--contact mdl-chip--deletable&quot;&gt;
1987 &lt;img class=&quot;mdl-chip__contact&quot; src=&quot;/templates/dashboard/images/user.jpg&quot;&gt;&lt;/img&gt;
1988 &lt;span class=&quot;mdl-chip__text&quot;&gt;Deletable Contact Chip&lt;/span&gt;
1989 &lt;a href=&quot;#&quot; class=&quot;mdl-chip__action&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;cancel&lt;/i&gt;&lt;/a&gt;
1990&lt;/span&gt;</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
1991body {
1992 padding: 20px;
1993 background: #fafafa;
1994 position: relative;
1995}
1996&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
1997 </div>
1998</div>
1999
2000
2001 <!-- Adding the demo page -->
2002
2003 <style>
2004
2005 </style>
2006
2007 <script>
2008
2009 </script>
2010
2011
2012 <div class="docs-text-styling docs-readme">
2013
2014
2015
2016
2017<h2 id="introduction">Introduction</h2>
2018<p>The Material Design Lite (MDL) <strong>chip</strong> component is a small, interactive element.
2019Chips are commonly used for contacts, text, rules, icons, and photos.</p>
2020<h2 id="to-include-an-mdl-chip-component-">TO INCLUDE AN MDL CHIP COMPONENT:</h2>
2021<p>&nbsp;1. Create a container element for the chip; typically <code>&lt;span&gt;</code> and <code>&lt;div&gt;</code> are used, but any container element should work equally well. If you need interactivity, use a <code>&lt;button&gt;</code>, or add the <code>tabindex</code> attribute to your container.</p>
2022<pre><code class="language-markup">&lt;span&gt;
2023&lt;/span&gt;
2024</code></pre>
2025<p>&nbsp;2. Add in the text wrapper and the MDL classes.</p>
2026<pre><code class="language-markup">&lt;span class=&quot;mdl-chip&quot;&gt;
2027 &lt;span class=&quot;mdl-chip__text&quot;&gt;Chip Text&lt;/span&gt;
2028&lt;/span&gt;
2029</code></pre>
2030<p>&nbsp;3. For deletable chips, add in the delete icon. This can be an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code> or non-interactive tags like <code>&lt;span&gt;</code>.</p>
2031<pre><code class="language-markup">&lt;span class=&quot;mdl-chip&quot;&gt;
2032 &lt;span class=&quot;mdl-chip__text&quot;&gt;Chip Text&lt;/span&gt;
2033 &lt;a href=&quot;#&quot; class=&quot;mdl-chip__action&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;cancel&lt;/i&gt;&lt;/a&gt;
2034&lt;/span&gt;
2035</code></pre>
2036<p>&nbsp;4. Contact chips need to have the <code>mdl-chip--contact</code> class added to the container, along with another container for the contact icon. The icon container for photos is typically an <code>&lt;img&gt;</code> tag, but other types of content can be used with a little extra supporting css.</p>
2037<pre><code class="language-markup">&lt;span class=&quot;mdl-chip&quot;&gt;
2038 &lt;span class=&quot;mdl-chip__contact mdl-color--teal mdl-color-text--white&quot;&gt;A&lt;/span&gt;
2039 &lt;span class=&quot;mdl-chip__text&quot;&gt;Chip Text&lt;/span&gt;
2040 &lt;a href=&quot;#&quot; class=&quot;mdl-chip__action&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;cancel&lt;/i&gt;&lt;/a&gt;
2041&lt;/span&gt;
2042</code></pre>
2043<h2 id="examples">Examples</h2>
2044<p>A button based contact chip whose contact image is a <code>&lt;span&gt;</code> with a <code>background-image</code>.</p>
2045<pre><code class="language-markup">&lt;style&gt;
2046 .demo-chip .mdl-chip__contact {
2047 background-image: url(&quot;./path/to/image&quot;);
2048 background-size: cover;
2049 }
2050&lt;/style&gt;
2051
2052&lt;button class=&quot;mdl-chip demo-chip&quot;&gt;
2053 &lt;span class=&quot;mdl-chip__contact&quot;&gt;&amp;nbsp;&lt;/span&gt;
2054 &lt;span class=&quot;mdl-chip__text&quot;&gt;Chip Text&lt;/span&gt;
2055 &lt;a href=&quot;#&quot; class=&quot;mdl-chip__action&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;cancel&lt;/i&gt;&lt;/a&gt;
2056&lt;/button&gt;
2057</code></pre>
2058<h2 id="css-classes">CSS Classes</h2>
2059<table>
2060<thead>
2061<tr>
2062<th>MDL Class</th>
2063<th>Effect</th>
2064<th>Remarks</th>
2065</tr>
2066</thead>
2067<tbody>
2068<tr>
2069<td><code>mdl-chip</code></td>
2070<td>Defines element as an MDL chip container</td>
2071<td>Required on &quot;outer&quot; container</td>
2072</tr>
2073<tr>
2074<td><code>mdl-chip--contact</code></td>
2075<td>Defines an MDL chip as a contact style chip</td>
2076<td>Optional, goes on &quot;outer&quot; container</td>
2077</tr>
2078<tr>
2079<td><code>mdl-chip__text</code></td>
2080<td>Defines element as the chip&#39;s text</td>
2081<td>Required on &quot;inner&quot; text container</td>
2082</tr>
2083<tr>
2084<td><code>mdl-chip__action</code></td>
2085<td>Defines element as the chip&#39;s action</td>
2086<td>Required on &quot;inner&quot; action container, if present</td>
2087</tr>
2088<tr>
2089<td><code>mdl-chip__contact</code></td>
2090<td>Defines element as the chip&#39;s contact container</td>
2091<td>Required on &quot;inner&quot; contact container, if the <code>mdl-chip--contact</code> class is present on &quot;outer&quot; container</td>
2092</tr>
2093</tbody>
2094</table>
2095
2096
2097
2098 </div>
2099
2100 </div>
2101 </section>
2102 <section id="dialog-section" class="mdl-components__page mdl-grid">
2103 <div class="mdl-cell mdl-cell--12-col">
2104 <div class="docs-text-styling component-title">
2105 <h3>Dialogs</h3>
2106 <p>Modal windows for dedicated user input.</p>
2107 </div>
2108
2109
2110
2111
2112
2113
2114 <!-- Add warning, if the component has one -->
2115
2116 <div class="mdl-components__warning"><b>Note: </b>Dialogs use the HTML &lt;dialog&gt; element, which currently has very limited cross-browser support. To ensure support across all modern browsers, please consider using a polyfill or creating your own. There is no polyfill included with MDL.</div>
2117
2118 <!-- Generating snippets -->
2119
2120 <!-- Adding the demo page -->
2121
2122 <style>
2123
2124 </style>
2125
2126 <script>
2127
2128 </script>
2129
2130
2131 <div class="docs-text-styling docs-readme">
2132
2133
2134
2135
2136<h2 id="introduction">Introduction</h2>
2137<p>The Material Design Lite (MDL) <strong>dialog</strong> component allows for verification of
2138user actions, simple data input, and alerts to provide extra information to users.</p>
2139<h2 id="basic-usage">Basic Usage</h2>
2140<p>To use the dialog component, you must be using a browser that supports the <a href="http://www.w3.org/TR/2013/CR-html5-20130806/interactive-elements.html#the-dialog-element">dialog element</a>.
2141Only Chrome and Opera have native support at the time of writing.
2142For other browsers you will need to include the <a href="https://github.com/GoogleChrome/dialog-polyfill">dialog polyfill</a> or create your own.</p>
2143<p>Once you have dialog support create a dialog element.
2144The element when using the polyfill <strong>must</strong> be a child of the <code>body</code> element.
2145Within that container, add a content element with the class <code>mdl-dialog__content</code>.
2146Add you content, then create an action container with the class <code>mdl-dialog__actions</code>.
2147Finally for the markup, add your buttons within this container for triggering dialog functions.</p>
2148<p>Keep in mind, the order is automatically reversed for actions.
2149Material Design requires that the primary (confirmation) action be displayed last.
2150So, the first action you create will appear last on the action bar.
2151This allows for more natural coding and tab ordering while following the specification.</p>
2152<p>Remember to add the event handlers for your action items.
2153After your dialog markup is created, add the event listeners to the page to trigger the dialog to show.</p>
2154<p>For example:</p>
2155<pre><code class="language-javascript"> var button = document.querySelector(&#39;button&#39;);
2156 var dialog = document.querySelector(&#39;dialog&#39;);
2157 button.addEventListener(&#39;click&#39;, function() {
2158 dialog.showModal();
2159 /* Or dialog.show(); to show the dialog without a backdrop. */
2160 });
2161</code></pre>
2162<h2 id="examples">Examples</h2>
2163<h3 id="simple-dialog">Simple Dialog</h3>
2164<p>See this example live in <a href="http://codepen.io/Garbee/full/EPoaMj/">codepen</a>.</p>
2165<pre><code class="language-markup">&lt;body&gt;
2166 &lt;button id=&quot;show-dialog&quot; type=&quot;button&quot; class=&quot;mdl-button&quot;&gt;Show Dialog&lt;/button&gt;
2167 &lt;dialog class=&quot;mdl-dialog&quot;&gt;
2168 &lt;h4 class=&quot;mdl-dialog__title&quot;&gt;Allow data collection?&lt;/h4&gt;
2169 &lt;div class=&quot;mdl-dialog__content&quot;&gt;
2170 &lt;p&gt;
2171 Allowing us to collect data will let us get you the information you want faster.
2172 &lt;/p&gt;
2173 &lt;/div&gt;
2174 &lt;div class=&quot;mdl-dialog__actions&quot;&gt;
2175 &lt;button type=&quot;button&quot; class=&quot;mdl-button&quot;&gt;Agree&lt;/button&gt;
2176 &lt;button type=&quot;button&quot; class=&quot;mdl-button close&quot;&gt;Disagree&lt;/button&gt;
2177 &lt;/div&gt;
2178 &lt;/dialog&gt;
2179 &lt;script&gt;
2180 var dialog = document.querySelector(&#39;dialog&#39;);
2181 var showDialogButton = document.querySelector(&#39;#show-dialog&#39;);
2182 if (! dialog.showModal) {
2183 dialogPolyfill.registerDialog(dialog);
2184 }
2185 showDialogButton.addEventListener(&#39;click&#39;, function() {
2186 dialog.showModal();
2187 });
2188 dialog.querySelector(&#39;.close&#39;).addEventListener(&#39;click&#39;, function() {
2189 dialog.close();
2190 });
2191 &lt;/script&gt;
2192&lt;/body&gt;
2193</code></pre>
2194<h3 id="dialog-with-full-width-actions">Dialog with full width actions</h3>
2195<p>See this example live in <a href="http://codepen.io/Garbee/full/JGMowG/">codepen</a>.</p>
2196<pre><code class="language-markup">&lt;body&gt;
2197 &lt;button type=&quot;button&quot; class=&quot;mdl-button show-modal&quot;&gt;Show Modal&lt;/button&gt;
2198 &lt;dialog class=&quot;mdl-dialog&quot;&gt;
2199 &lt;div class=&quot;mdl-dialog__content&quot;&gt;
2200 &lt;p&gt;
2201 Allow this site to collect usage data to improve your experience?
2202 &lt;/p&gt;
2203 &lt;/div&gt;
2204 &lt;div class=&quot;mdl-dialog__actions mdl-dialog__actions--full-width&quot;&gt;
2205 &lt;button type=&quot;button&quot; class=&quot;mdl-button&quot;&gt;Agree&lt;/button&gt;
2206 &lt;button type=&quot;button&quot; class=&quot;mdl-button close&quot;&gt;Disagree&lt;/button&gt;
2207 &lt;/div&gt;
2208 &lt;/dialog&gt;
2209 &lt;script&gt;
2210 var dialog = document.querySelector(&#39;dialog&#39;);
2211 var showModalButton = document.querySelector(&#39;.show-modal&#39;);
2212 if (! dialog.showModal) {
2213 dialogPolyfill.registerDialog(dialog);
2214 }
2215 showModalButton.addEventListener(&#39;click&#39;, function() {
2216 dialog.showModal();
2217 });
2218 dialog.querySelector(&#39;.close&#39;).addEventListener(&#39;click&#39;, function() {
2219 dialog.close();
2220 });
2221 &lt;/script&gt;
2222&lt;/body&gt;
2223</code></pre>
2224<h2 id="css-classes">CSS Classes</h2>
2225<h3 id="blocks">Blocks</h3>
2226<table>
2227<thead>
2228<tr>
2229<th>MDL Class</th>
2230<th>Effect</th>
2231<th>Remarks</th>
2232</tr>
2233</thead>
2234<tbody>
2235<tr>
2236<td><code>mdl-dialog</code></td>
2237<td>Defines the container of the dialog component.</td>
2238<td>Required on dialog container.</td>
2239</tr>
2240</tbody>
2241</table>
2242<h3 id="elements">Elements</h3>
2243<table>
2244<thead>
2245<tr>
2246<th>MDL Class</th>
2247<th>Effect</th>
2248<th>Remarks</th>
2249</tr>
2250</thead>
2251<tbody>
2252<tr>
2253<td><code>mdl-dialog__title</code></td>
2254<td>Defines the title container in the dialog.</td>
2255<td>Optional on title container.</td>
2256</tr>
2257<tr>
2258<td><code>mdl-dialog__content</code></td>
2259<td>Defines the content container of the dialog.</td>
2260<td>Required on content container.</td>
2261</tr>
2262<tr>
2263<td><code>mdl-dialog__actions</code></td>
2264<td>Defines the actions container in the dialog.</td>
2265<td>Required on action container.</td>
2266</tr>
2267</tbody>
2268</table>
2269<h3 id="modifiers">Modifiers</h3>
2270<table>
2271<thead>
2272<tr>
2273<th>MDL Class</th>
2274<th>Effect</th>
2275<th>Remarks</th>
2276</tr>
2277</thead>
2278<tbody>
2279<tr>
2280<td><code>mdl-dialog__actions--full-width</code></td>
2281<td>Modifies the actions to each take the full width of the container. This makes each take their own line.</td>
2282<td>Optional on action container.</td>
2283</tr>
2284</tbody>
2285</table>
2286
2287
2288
2289 </div>
2290
2291 </div>
2292 </section>
2293 <section id="layout-section" class="mdl-components__page mdl-grid">
2294 <div class="mdl-cell mdl-cell--12-col">
2295 <div class="docs-text-styling component-title">
2296 <h3>Layout</h3>
2297 <p>Building blocks for constructing a page layout.</p>
2298 </div>
2299
2300
2301 <section class="docs-toc docs-text-styling">
2302 <nav class="section-content">
2303 <ul>
2304
2305 <li><a href="#layout-section/layout">Navigation layouts</a></li>
2306
2307 <li><a href="#layout-section/grid">Grid</a></li>
2308
2309 <li><a href="#layout-section/tabs">Tabs</a></li>
2310
2311 <li><a href="#layout-section/footer">Footer</a></li>
2312
2313 </ul>
2314 </nav>
2315 </section>
2316
2317
2318
2319
2320
2321 <span class="docs-text-styling">
2322 <h1 class="mdl-components__classname" id="layout-section/layout">Navigation layouts</h1>
2323 </span>
2324
2325 <!-- Add warning, if the component has one -->
2326
2327 <!-- Generating snippets -->
2328
2329
2330
2331<div class="snippet-group is-full-width">
2332
2333 <div class="snippet-header">
2334 <div class="snippet-demos">
2335 <div class="snippet-demo-padding"></div>
2336
2337
2338
2339
2340 <div class="snippet-demo">
2341 <div class="snippet-demo-container demo-layout demo-layout__transparent">
2342 <style>
2343.demo-layout.demo-layout__transparent {
2344 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
2345 0 3px 1px -2px rgba(0, 0, 0, 0.2),
2346 0 1px 5px 0 rgba(0, 0, 0, 0.12);
2347 width: 100%;
2348 position: relative;
2349 height: 300px;
2350}
2351</style>
2352
2353<!-- Uses a transparent header that draws on top of the layout's background -->
2354<style>
2355.demo-layout-transparent {
2356 background: url('../assets/demos/transparent.jpg') center / cover;
2357}
2358.demo-layout-transparent .mdl-layout__header,
2359.demo-layout-transparent .mdl-layout__drawer-button {
2360 /* This background is dark, so we set text to white. Use 87% black instead if
2361 your background is light. */
2362 color: white;
2363}
2364</style>
2365
2366<div class="demo-layout-transparent mdl-layout mdl-js-layout">
2367 <header class="mdl-layout__header mdl-layout__header--transparent">
2368 <div class="mdl-layout__header-row">
2369 <!-- Title -->
2370 <span class="mdl-layout-title">Title</span>
2371 <!-- Add spacer, to align navigation to the right -->
2372 <div class="mdl-layout-spacer"></div>
2373 <!-- Navigation -->
2374 <nav class="mdl-navigation">
2375 <a class="mdl-navigation__link" href="">Link</a>
2376 <a class="mdl-navigation__link" href="">Link</a>
2377 <a class="mdl-navigation__link" href="">Link</a>
2378 <a class="mdl-navigation__link" href="">Link</a>
2379 </nav>
2380 </div>
2381 </header>
2382 <div class="mdl-layout__drawer">
2383 <span class="mdl-layout-title">Title</span>
2384 <nav class="mdl-navigation">
2385 <a class="mdl-navigation__link" href="">Link</a>
2386 <a class="mdl-navigation__link" href="">Link</a>
2387 <a class="mdl-navigation__link" href="">Link</a>
2388 <a class="mdl-navigation__link" href="">Link</a>
2389 </nav>
2390 </div>
2391 <main class="mdl-layout__content">
2392 </main>
2393</div>
2394
2395
2396 </div>
2397 </div>
2398 <div class="snippet-demo-padding"></div>
2399 </div>
2400 <div class="snippet-captions">
2401 <div class="snippet-caption-padding"></div>
2402
2403 <div class="snippet-caption">
2404 Transparent header
2405 </div>
2406 <div class="snippet-caption-padding"></div>
2407 </div>
2408 </div>
2409 <div class="snippet-code">
2410 <pre class="language-markup codepen-button-enabled"><code id="layout/transparent.html">&lt;!-- Uses a transparent header that draws on top of the layout&#39;s background --&gt;
2411&lt;style&gt;
2412.demo-layout-transparent {
2413 background: url(&#39;../assets/demos/transparent.jpg&#39;) center / cover;
2414}
2415.demo-layout-transparent .mdl-layout__header,
2416.demo-layout-transparent .mdl-layout__drawer-button {
2417 /* This background is dark, so we set text to white. Use 87% black instead if
2418 your background is light. */
2419 color: white;
2420}
2421&lt;/style&gt;
2422
2423&lt;div class=&quot;demo-layout-transparent mdl-layout mdl-js-layout&quot;&gt;
2424 &lt;header class=&quot;mdl-layout__header mdl-layout__header--transparent&quot;&gt;
2425 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
2426 &lt;!-- Title --&gt;
2427 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2428 &lt;!-- Add spacer, to align navigation to the right --&gt;
2429 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
2430 &lt;!-- Navigation --&gt;
2431 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2432 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2433 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2434 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2435 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2436 &lt;/nav&gt;
2437 &lt;/div&gt;
2438 &lt;/header&gt;
2439 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
2440 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2441 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2442 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2443 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2444 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2445 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2446 &lt;/nav&gt;
2447 &lt;/div&gt;
2448 &lt;main class=&quot;mdl-layout__content&quot;&gt;
2449 &lt;/main&gt;
2450&lt;/div&gt;
2451</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
2452 </div>
2453</div>
2454
2455
2456
2457
2458<div class="snippet-group is-full-width">
2459
2460 <div class="snippet-header">
2461 <div class="snippet-demos">
2462 <div class="snippet-demo-padding"></div>
2463
2464
2465
2466
2467 <div class="snippet-demo">
2468 <div class="snippet-demo-container demo-layout demo-layout__fixed-drawer">
2469 <style>
2470.demo-layout.demo-layout__fixed-drawer {
2471 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
2472 0 3px 1px -2px rgba(0, 0, 0, 0.2),
2473 0 1px 5px 0 rgba(0, 0, 0, 0.12);
2474 width: 100%;
2475 position: relative;
2476 height: 300px;
2477}
2478.demo-layout.demo-layout__fixed-drawer .mdl-layout__content {
2479 background: white;
2480}
2481</style>
2482
2483<!-- No header, and the drawer stays open on larger screens (fixed drawer). -->
2484<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer">
2485 <div class="mdl-layout__drawer">
2486 <span class="mdl-layout-title">Title</span>
2487 <nav class="mdl-navigation">
2488 <a class="mdl-navigation__link" href="">Link</a>
2489 <a class="mdl-navigation__link" href="">Link</a>
2490 <a class="mdl-navigation__link" href="">Link</a>
2491 <a class="mdl-navigation__link" href="">Link</a>
2492 </nav>
2493 </div>
2494 <main class="mdl-layout__content">
2495 <div class="page-content"><!-- Your content goes here --></div>
2496 </main>
2497</div>
2498
2499
2500 </div>
2501 </div>
2502 <div class="snippet-demo-padding"></div>
2503 </div>
2504 <div class="snippet-captions">
2505 <div class="snippet-caption-padding"></div>
2506
2507 <div class="snippet-caption">
2508 Fixed drawer, no header
2509 </div>
2510 <div class="snippet-caption-padding"></div>
2511 </div>
2512 </div>
2513 <div class="snippet-code">
2514 <pre class="language-markup codepen-button-enabled"><code id="layout/fixed-drawer.html">&lt;!-- No header, and the drawer stays open on larger screens (fixed drawer). --&gt;
2515&lt;div class=&quot;mdl-layout mdl-js-layout mdl-layout--fixed-drawer&quot;&gt;
2516 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
2517 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2518 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2519 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2520 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2521 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2522 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2523 &lt;/nav&gt;
2524 &lt;/div&gt;
2525 &lt;main class=&quot;mdl-layout__content&quot;&gt;
2526 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
2527 &lt;/main&gt;
2528&lt;/div&gt;
2529</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
2530 </div>
2531</div>
2532
2533
2534
2535
2536<div class="snippet-group is-full-width">
2537
2538 <div class="snippet-header">
2539 <div class="snippet-demos">
2540 <div class="snippet-demo-padding"></div>
2541
2542
2543
2544
2545 <div class="snippet-demo">
2546 <div class="snippet-demo-container demo-layout demo-layout__fixed-header">
2547 <style>
2548.demo-layout.demo-layout__fixed-header {
2549 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
2550 0 3px 1px -2px rgba(0, 0, 0, 0.2),
2551 0 1px 5px 0 rgba(0, 0, 0, 0.12);
2552 width: 100%;
2553 position: relative;
2554 height: 300px;
2555}
2556.demo-layout.demo-layout__fixed-header .mdl-layout__content {
2557 background: white;
2558}
2559</style>
2560
2561<!-- Always shows a header, even in smaller screens. -->
2562<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
2563 <header class="mdl-layout__header">
2564 <div class="mdl-layout__header-row">
2565 <!-- Title -->
2566 <span class="mdl-layout-title">Title</span>
2567 <!-- Add spacer, to align navigation to the right -->
2568 <div class="mdl-layout-spacer"></div>
2569 <!-- Navigation. We hide it in small screens. -->
2570 <nav class="mdl-navigation mdl-layout--large-screen-only">
2571 <a class="mdl-navigation__link" href="">Link</a>
2572 <a class="mdl-navigation__link" href="">Link</a>
2573 <a class="mdl-navigation__link" href="">Link</a>
2574 <a class="mdl-navigation__link" href="">Link</a>
2575 </nav>
2576 </div>
2577 </header>
2578 <div class="mdl-layout__drawer">
2579 <span class="mdl-layout-title">Title</span>
2580 <nav class="mdl-navigation">
2581 <a class="mdl-navigation__link" href="">Link</a>
2582 <a class="mdl-navigation__link" href="">Link</a>
2583 <a class="mdl-navigation__link" href="">Link</a>
2584 <a class="mdl-navigation__link" href="">Link</a>
2585 </nav>
2586 </div>
2587 <main class="mdl-layout__content">
2588 <div class="page-content"><!-- Your content goes here --></div>
2589 </main>
2590</div>
2591
2592
2593 </div>
2594 </div>
2595 <div class="snippet-demo-padding"></div>
2596 </div>
2597 <div class="snippet-captions">
2598 <div class="snippet-caption-padding"></div>
2599
2600 <div class="snippet-caption">
2601 Fixed header
2602 </div>
2603 <div class="snippet-caption-padding"></div>
2604 </div>
2605 </div>
2606 <div class="snippet-code">
2607 <pre class="language-markup codepen-button-enabled"><code id="layout/fixed-header.html">&lt;!-- Always shows a header, even in smaller screens. --&gt;
2608&lt;div class=&quot;mdl-layout mdl-js-layout mdl-layout--fixed-header&quot;&gt;
2609 &lt;header class=&quot;mdl-layout__header&quot;&gt;
2610 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
2611 &lt;!-- Title --&gt;
2612 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2613 &lt;!-- Add spacer, to align navigation to the right --&gt;
2614 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
2615 &lt;!-- Navigation. We hide it in small screens. --&gt;
2616 &lt;nav class=&quot;mdl-navigation mdl-layout--large-screen-only&quot;&gt;
2617 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2618 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2619 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2620 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2621 &lt;/nav&gt;
2622 &lt;/div&gt;
2623 &lt;/header&gt;
2624 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
2625 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2626 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2627 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2628 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2629 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2630 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2631 &lt;/nav&gt;
2632 &lt;/div&gt;
2633 &lt;main class=&quot;mdl-layout__content&quot;&gt;
2634 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
2635 &lt;/main&gt;
2636&lt;/div&gt;
2637</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
2638 </div>
2639</div>
2640
2641
2642
2643
2644<div class="snippet-group is-full-width">
2645
2646 <div class="snippet-header">
2647 <div class="snippet-demos">
2648 <div class="snippet-demo-padding"></div>
2649
2650
2651
2652
2653 <div class="snippet-demo">
2654 <div class="snippet-demo-container demo-layout demo-layout__fixed-header-drawer">
2655 <style>
2656.demo-layout.demo-layout__fixed-header-drawer {
2657 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
2658 0 3px 1px -2px rgba(0, 0, 0, 0.2),
2659 0 1px 5px 0 rgba(0, 0, 0, 0.12);
2660 width: 100%;
2661 position: relative;
2662 height: 300px;
2663}
2664.demo-layout.demo-layout__fixed-header-drawer.mdl-layout__content {
2665 background: white;
2666}
2667</style>
2668
2669<!-- The drawer is always open in large screens. The header is always shown,
2670 even in small screens. -->
2671<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer
2672 mdl-layout--fixed-header">
2673 <header class="mdl-layout__header">
2674 <div class="mdl-layout__header-row">
2675 <div class="mdl-layout-spacer"></div>
2676 <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
2677 mdl-textfield--floating-label mdl-textfield--align-right">
2678 <label class="mdl-button mdl-js-button mdl-button--icon"
2679 for="fixed-header-drawer-exp">
2680 <i class="material-icons">search</i>
2681 </label>
2682 <div class="mdl-textfield__expandable-holder">
2683 <input class="mdl-textfield__input" type="text" name="sample"
2684 id="fixed-header-drawer-exp">
2685 </div>
2686 </div>
2687 </div>
2688 </header>
2689 <div class="mdl-layout__drawer">
2690 <span class="mdl-layout-title">Title</span>
2691 <nav class="mdl-navigation">
2692 <a class="mdl-navigation__link" href="">Link</a>
2693 <a class="mdl-navigation__link" href="">Link</a>
2694 <a class="mdl-navigation__link" href="">Link</a>
2695 <a class="mdl-navigation__link" href="">Link</a>
2696 </nav>
2697 </div>
2698 <main class="mdl-layout__content">
2699 <div class="page-content"><!-- Your content goes here --></div>
2700 </main>
2701</div>
2702
2703
2704 </div>
2705 </div>
2706 <div class="snippet-demo-padding"></div>
2707 </div>
2708 <div class="snippet-captions">
2709 <div class="snippet-caption-padding"></div>
2710
2711 <div class="snippet-caption">
2712 Fixed header and drawer
2713 </div>
2714 <div class="snippet-caption-padding"></div>
2715 </div>
2716 </div>
2717 <div class="snippet-code">
2718 <pre class="language-markup codepen-button-enabled"><code id="layout/fixed-header-drawer.html">&lt;!-- The drawer is always open in large screens. The header is always shown,
2719 even in small screens. --&gt;
2720&lt;div class=&quot;mdl-layout mdl-js-layout mdl-layout--fixed-drawer
2721 mdl-layout--fixed-header&quot;&gt;
2722 &lt;header class=&quot;mdl-layout__header&quot;&gt;
2723 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
2724 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
2725 &lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--expandable
2726 mdl-textfield--floating-label mdl-textfield--align-right&quot;&gt;
2727 &lt;label class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;
2728 for=&quot;fixed-header-drawer-exp&quot;&gt;
2729 &lt;i class=&quot;material-icons&quot;&gt;search&lt;/i&gt;
2730 &lt;/label&gt;
2731 &lt;div class=&quot;mdl-textfield__expandable-holder&quot;&gt;
2732 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; name=&quot;sample&quot;
2733 id=&quot;fixed-header-drawer-exp&quot;&gt;
2734 &lt;/div&gt;
2735 &lt;/div&gt;
2736 &lt;/div&gt;
2737 &lt;/header&gt;
2738 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
2739 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2740 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2741 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2742 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2743 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2744 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2745 &lt;/nav&gt;
2746 &lt;/div&gt;
2747 &lt;main class=&quot;mdl-layout__content&quot;&gt;
2748 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
2749 &lt;/main&gt;
2750&lt;/div&gt;
2751</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
2752 </div>
2753</div>
2754
2755
2756
2757
2758<div class="snippet-group is-full-width">
2759
2760 <div class="snippet-header">
2761 <div class="snippet-demos">
2762 <div class="snippet-demo-padding"></div>
2763
2764
2765
2766
2767 <div class="snippet-demo">
2768 <div class="snippet-demo-container demo-layout demo-layout__scrolling-header">
2769 <style>
2770.demo-layout.demo-layout__scrolling-header {
2771 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
2772 0 3px 1px -2px rgba(0, 0, 0, 0.2),
2773 0 1px 5px 0 rgba(0, 0, 0, 0.12);
2774 width: 100%;
2775 position: relative;
2776 height: 300px;
2777}
2778.demo-layout.demo-layout__scrolling-header .page-content {
2779 height: 600px;
2780 background: white;
2781}
2782</style>
2783
2784<!-- Uses a header that scrolls with the text, rather than staying
2785 locked at the top -->
2786<div class="mdl-layout mdl-js-layout">
2787 <header class="mdl-layout__header mdl-layout__header--scroll">
2788 <div class="mdl-layout__header-row">
2789 <!-- Title -->
2790 <span class="mdl-layout-title">Title</span>
2791 <!-- Add spacer, to align navigation to the right -->
2792 <div class="mdl-layout-spacer"></div>
2793 <!-- Navigation -->
2794 <nav class="mdl-navigation">
2795 <a class="mdl-navigation__link" href="">Link</a>
2796 <a class="mdl-navigation__link" href="">Link</a>
2797 <a class="mdl-navigation__link" href="">Link</a>
2798 <a class="mdl-navigation__link" href="">Link</a>
2799 </nav>
2800 </div>
2801 </header>
2802 <div class="mdl-layout__drawer">
2803 <span class="mdl-layout-title">Title</span>
2804 <nav class="mdl-navigation">
2805 <a class="mdl-navigation__link" href="">Link</a>
2806 <a class="mdl-navigation__link" href="">Link</a>
2807 <a class="mdl-navigation__link" href="">Link</a>
2808 <a class="mdl-navigation__link" href="">Link</a>
2809 </nav>
2810 </div>
2811 <main class="mdl-layout__content">
2812 <div class="page-content"><!-- Your content goes here --></div>
2813 </main>
2814</div>
2815
2816
2817 </div>
2818 </div>
2819 <div class="snippet-demo-padding"></div>
2820 </div>
2821 <div class="snippet-captions">
2822 <div class="snippet-caption-padding"></div>
2823
2824 <div class="snippet-caption">
2825 Scrolling header
2826 </div>
2827 <div class="snippet-caption-padding"></div>
2828 </div>
2829 </div>
2830 <div class="snippet-code">
2831 <pre class="language-markup codepen-button-enabled"><code id="layout/scrolling-header.html">&lt;!-- Uses a header that scrolls with the text, rather than staying
2832 locked at the top --&gt;
2833&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
2834 &lt;header class=&quot;mdl-layout__header mdl-layout__header--scroll&quot;&gt;
2835 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
2836 &lt;!-- Title --&gt;
2837 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2838 &lt;!-- Add spacer, to align navigation to the right --&gt;
2839 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
2840 &lt;!-- Navigation --&gt;
2841 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2842 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2843 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2844 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2845 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2846 &lt;/nav&gt;
2847 &lt;/div&gt;
2848 &lt;/header&gt;
2849 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
2850 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2851 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2852 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2853 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2854 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2855 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2856 &lt;/nav&gt;
2857 &lt;/div&gt;
2858 &lt;main class=&quot;mdl-layout__content&quot;&gt;
2859 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
2860 &lt;/main&gt;
2861&lt;/div&gt;
2862</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
2863 </div>
2864</div>
2865
2866
2867
2868
2869<div class="snippet-group is-full-width">
2870
2871 <div class="snippet-header">
2872 <div class="snippet-demos">
2873 <div class="snippet-demo-padding"></div>
2874
2875
2876
2877
2878 <div class="snippet-demo">
2879 <div class="snippet-demo-container demo-layout demo-layout__waterfall-header">
2880 <style>
2881.demo-layout.demo-layout__waterfall-header {
2882 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
2883 0 3px 1px -2px rgba(0, 0, 0, 0.2),
2884 0 1px 5px 0 rgba(0, 0, 0, 0.12);
2885 width: 100%;
2886 position: relative;
2887 height: 300px;
2888}
2889.demo-layout.demo-layout__waterfall-header .page-content {
2890 height: 600px;
2891 background: white;
2892}
2893</style>
2894
2895<!-- Uses a header that contracts as the page scrolls down. -->
2896<style>
2897.demo-layout-waterfall .mdl-layout__header-row .mdl-navigation__link:last-of-type {
2898 padding-right: 0;
2899}
2900</style>
2901
2902<div class="demo-layout-waterfall mdl-layout mdl-js-layout">
2903 <header class="mdl-layout__header mdl-layout__header--waterfall">
2904 <!-- Top row, always visible -->
2905 <div class="mdl-layout__header-row">
2906 <!-- Title -->
2907 <span class="mdl-layout-title">Title</span>
2908 <div class="mdl-layout-spacer"></div>
2909 <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
2910 mdl-textfield--floating-label mdl-textfield--align-right">
2911 <label class="mdl-button mdl-js-button mdl-button--icon"
2912 for="waterfall-exp">
2913 <i class="material-icons">search</i>
2914 </label>
2915 <div class="mdl-textfield__expandable-holder">
2916 <input class="mdl-textfield__input" type="text" name="sample"
2917 id="waterfall-exp">
2918 </div>
2919 </div>
2920 </div>
2921 <!-- Bottom row, not visible on scroll -->
2922 <div class="mdl-layout__header-row">
2923 <div class="mdl-layout-spacer"></div>
2924 <!-- Navigation -->
2925 <nav class="mdl-navigation">
2926 <a class="mdl-navigation__link" href="">Link</a>
2927 <a class="mdl-navigation__link" href="">Link</a>
2928 <a class="mdl-navigation__link" href="">Link</a>
2929 <a class="mdl-navigation__link" href="">Link</a>
2930 </nav>
2931 </div>
2932 </header>
2933 <div class="mdl-layout__drawer">
2934 <span class="mdl-layout-title">Title</span>
2935 <nav class="mdl-navigation">
2936 <a class="mdl-navigation__link" href="">Link</a>
2937 <a class="mdl-navigation__link" href="">Link</a>
2938 <a class="mdl-navigation__link" href="">Link</a>
2939 <a class="mdl-navigation__link" href="">Link</a>
2940 </nav>
2941 </div>
2942 <main class="mdl-layout__content">
2943 <div class="page-content"><!-- Your content goes here --></div>
2944 </main>
2945</div>
2946
2947
2948 </div>
2949 </div>
2950 <div class="snippet-demo-padding"></div>
2951 </div>
2952 <div class="snippet-captions">
2953 <div class="snippet-caption-padding"></div>
2954
2955 <div class="snippet-caption">
2956 Waterfall header
2957 </div>
2958 <div class="snippet-caption-padding"></div>
2959 </div>
2960 </div>
2961 <div class="snippet-code">
2962 <pre class="language-markup codepen-button-enabled"><code id="layout/waterfall-header.html">&lt;!-- Uses a header that contracts as the page scrolls down. --&gt;
2963&lt;style&gt;
2964.demo-layout-waterfall .mdl-layout__header-row .mdl-navigation__link:last-of-type {
2965 padding-right: 0;
2966}
2967&lt;/style&gt;
2968
2969&lt;div class=&quot;demo-layout-waterfall mdl-layout mdl-js-layout&quot;&gt;
2970 &lt;header class=&quot;mdl-layout__header mdl-layout__header--waterfall&quot;&gt;
2971 &lt;!-- Top row, always visible --&gt;
2972 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
2973 &lt;!-- Title --&gt;
2974 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
2975 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
2976 &lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--expandable
2977 mdl-textfield--floating-label mdl-textfield--align-right&quot;&gt;
2978 &lt;label class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;
2979 for=&quot;waterfall-exp&quot;&gt;
2980 &lt;i class=&quot;material-icons&quot;&gt;search&lt;/i&gt;
2981 &lt;/label&gt;
2982 &lt;div class=&quot;mdl-textfield__expandable-holder&quot;&gt;
2983 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; name=&quot;sample&quot;
2984 id=&quot;waterfall-exp&quot;&gt;
2985 &lt;/div&gt;
2986 &lt;/div&gt;
2987 &lt;/div&gt;
2988 &lt;!-- Bottom row, not visible on scroll --&gt;
2989 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
2990 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
2991 &lt;!-- Navigation --&gt;
2992 &lt;nav class=&quot;mdl-navigation&quot;&gt;
2993 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2994 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2995 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2996 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
2997 &lt;/nav&gt;
2998 &lt;/div&gt;
2999 &lt;/header&gt;
3000 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3001 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
3002 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3003 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
3004 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
3005 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
3006 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;&quot;&gt;Link&lt;/a&gt;
3007 &lt;/nav&gt;
3008 &lt;/div&gt;
3009 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3010 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3011 &lt;/main&gt;
3012&lt;/div&gt;
3013</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
3014 </div>
3015</div>
3016
3017
3018
3019
3020<div class="snippet-group is-full-width">
3021
3022 <div class="snippet-header">
3023 <div class="snippet-demos">
3024 <div class="snippet-demo-padding"></div>
3025
3026
3027
3028
3029 <div class="snippet-demo">
3030 <div class="snippet-demo-container demo-layout demo-layout__scrollable-tabs">
3031 <style>
3032.demo-layout.demo-layout__scrollable-tabs {
3033 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
3034 0 3px 1px -2px rgba(0, 0, 0, 0.2),
3035 0 1px 5px 0 rgba(0, 0, 0, 0.12);
3036 width: 100%;
3037 position: relative;
3038 height: 300px;
3039}
3040.demo-layout.demo-layout__scrollable-tabs .mdl-layout__content {
3041 background: white;
3042}
3043</style>
3044
3045<!-- Simple header with scrollable tabs. -->
3046<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
3047 <header class="mdl-layout__header">
3048 <div class="mdl-layout__header-row">
3049 <!-- Title -->
3050 <span class="mdl-layout-title">Title</span>
3051 </div>
3052 <!-- Tabs -->
3053 <div class="mdl-layout__tab-bar mdl-js-ripple-effect">
3054 <a href="#scroll-tab-1" class="mdl-layout__tab is-active">Tab 1</a>
3055 <a href="#scroll-tab-2" class="mdl-layout__tab">Tab 2</a>
3056 <a href="#scroll-tab-3" class="mdl-layout__tab">Tab 3</a>
3057 <a href="#scroll-tab-4" class="mdl-layout__tab">Tab 4</a>
3058 <a href="#scroll-tab-5" class="mdl-layout__tab">Tab 5</a>
3059 <a href="#scroll-tab-6" class="mdl-layout__tab">Tab 6</a>
3060 </div>
3061 </header>
3062 <div class="mdl-layout__drawer">
3063 <span class="mdl-layout-title">Title</span>
3064 </div>
3065 <main class="mdl-layout__content">
3066 <section class="mdl-layout__tab-panel is-active" id="scroll-tab-1">
3067 <div class="page-content"><!-- Your content goes here --></div>
3068 </section>
3069 <section class="mdl-layout__tab-panel" id="scroll-tab-2">
3070 <div class="page-content"><!-- Your content goes here --></div>
3071 </section>
3072 <section class="mdl-layout__tab-panel" id="scroll-tab-3">
3073 <div class="page-content"><!-- Your content goes here --></div>
3074 </section>
3075 <section class="mdl-layout__tab-panel" id="scroll-tab-4">
3076 <div class="page-content"><!-- Your content goes here --></div>
3077 </section>
3078 <section class="mdl-layout__tab-panel" id="scroll-tab-5">
3079 <div class="page-content"><!-- Your content goes here --></div>
3080 </section>
3081 <section class="mdl-layout__tab-panel" id="scroll-tab-6">
3082 <div class="page-content"><!-- Your content goes here --></div>
3083 </section>
3084 </main>
3085</div>
3086
3087
3088 </div>
3089 </div>
3090 <div class="snippet-demo-padding"></div>
3091 </div>
3092 <div class="snippet-captions">
3093 <div class="snippet-caption-padding"></div>
3094
3095 <div class="snippet-caption">
3096 Scrollable tabs
3097 </div>
3098 <div class="snippet-caption-padding"></div>
3099 </div>
3100 </div>
3101 <div class="snippet-code">
3102 <pre class="language-markup codepen-button-enabled"><code id="layout/scrollable-tabs.html">&lt;!-- Simple header with scrollable tabs. --&gt;
3103&lt;div class=&quot;mdl-layout mdl-js-layout mdl-layout--fixed-header&quot;&gt;
3104 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3105 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3106 &lt;!-- Title --&gt;
3107 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
3108 &lt;/div&gt;
3109 &lt;!-- Tabs --&gt;
3110 &lt;div class=&quot;mdl-layout__tab-bar mdl-js-ripple-effect&quot;&gt;
3111 &lt;a href=&quot;#scroll-tab-1&quot; class=&quot;mdl-layout__tab is-active&quot;&gt;Tab 1&lt;/a&gt;
3112 &lt;a href=&quot;#scroll-tab-2&quot; class=&quot;mdl-layout__tab&quot;&gt;Tab 2&lt;/a&gt;
3113 &lt;a href=&quot;#scroll-tab-3&quot; class=&quot;mdl-layout__tab&quot;&gt;Tab 3&lt;/a&gt;
3114 &lt;a href=&quot;#scroll-tab-4&quot; class=&quot;mdl-layout__tab&quot;&gt;Tab 4&lt;/a&gt;
3115 &lt;a href=&quot;#scroll-tab-5&quot; class=&quot;mdl-layout__tab&quot;&gt;Tab 5&lt;/a&gt;
3116 &lt;a href=&quot;#scroll-tab-6&quot; class=&quot;mdl-layout__tab&quot;&gt;Tab 6&lt;/a&gt;
3117 &lt;/div&gt;
3118 &lt;/header&gt;
3119 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3120 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
3121 &lt;/div&gt;
3122 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3123 &lt;section class=&quot;mdl-layout__tab-panel is-active&quot; id=&quot;scroll-tab-1&quot;&gt;
3124 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3125 &lt;/section&gt;
3126 &lt;section class=&quot;mdl-layout__tab-panel&quot; id=&quot;scroll-tab-2&quot;&gt;
3127 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3128 &lt;/section&gt;
3129 &lt;section class=&quot;mdl-layout__tab-panel&quot; id=&quot;scroll-tab-3&quot;&gt;
3130 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3131 &lt;/section&gt;
3132 &lt;section class=&quot;mdl-layout__tab-panel&quot; id=&quot;scroll-tab-4&quot;&gt;
3133 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3134 &lt;/section&gt;
3135 &lt;section class=&quot;mdl-layout__tab-panel&quot; id=&quot;scroll-tab-5&quot;&gt;
3136 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3137 &lt;/section&gt;
3138 &lt;section class=&quot;mdl-layout__tab-panel&quot; id=&quot;scroll-tab-6&quot;&gt;
3139 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3140 &lt;/section&gt;
3141 &lt;/main&gt;
3142&lt;/div&gt;
3143</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
3144 </div>
3145</div>
3146
3147
3148
3149
3150<div class="snippet-group is-full-width">
3151
3152 <div class="snippet-header">
3153 <div class="snippet-demos">
3154 <div class="snippet-demo-padding"></div>
3155
3156
3157
3158
3159 <div class="snippet-demo">
3160 <div class="snippet-demo-container demo-layout demo-layout__fixed-tabs">
3161 <style>
3162.demo-layout.demo-layout__fixed-tabs {
3163 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
3164 0 3px 1px -2px rgba(0, 0, 0, 0.2),
3165 0 1px 5px 0 rgba(0, 0, 0, 0.12);
3166 width: 100%;
3167 position: relative;
3168 height: 300px;
3169}
3170.demo-layout.demo-layout__fixed-tabs .mdl-layout__content {
3171 background: white;
3172}
3173</style>
3174
3175<!-- Simple header with fixed tabs. -->
3176<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header
3177 mdl-layout--fixed-tabs">
3178 <header class="mdl-layout__header">
3179 <div class="mdl-layout__header-row">
3180 <!-- Title -->
3181 <span class="mdl-layout-title">Title</span>
3182 </div>
3183 <!-- Tabs -->
3184 <div class="mdl-layout__tab-bar mdl-js-ripple-effect">
3185 <a href="#fixed-tab-1" class="mdl-layout__tab is-active">Tab 1</a>
3186 <a href="#fixed-tab-2" class="mdl-layout__tab">Tab 2</a>
3187 <a href="#fixed-tab-3" class="mdl-layout__tab">Tab 3</a>
3188 </div>
3189 </header>
3190 <div class="mdl-layout__drawer">
3191 <span class="mdl-layout-title">Title</span>
3192 </div>
3193 <main class="mdl-layout__content">
3194 <section class="mdl-layout__tab-panel is-active" id="fixed-tab-1">
3195 <div class="page-content"><!-- Your content goes here --></div>
3196 </section>
3197 <section class="mdl-layout__tab-panel" id="fixed-tab-2">
3198 <div class="page-content"><!-- Your content goes here --></div>
3199 </section>
3200 <section class="mdl-layout__tab-panel" id="fixed-tab-3">
3201 <div class="page-content"><!-- Your content goes here --></div>
3202 </section>
3203 </main>
3204</div>
3205
3206
3207 </div>
3208 </div>
3209 <div class="snippet-demo-padding"></div>
3210 </div>
3211 <div class="snippet-captions">
3212 <div class="snippet-caption-padding"></div>
3213
3214 <div class="snippet-caption">
3215 Fixed tabs
3216 </div>
3217 <div class="snippet-caption-padding"></div>
3218 </div>
3219 </div>
3220 <div class="snippet-code">
3221 <pre class="language-markup codepen-button-enabled"><code id="layout/fixed-tabs.html">&lt;!-- Simple header with fixed tabs. --&gt;
3222&lt;div class=&quot;mdl-layout mdl-js-layout mdl-layout--fixed-header
3223 mdl-layout--fixed-tabs&quot;&gt;
3224 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3225 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3226 &lt;!-- Title --&gt;
3227 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
3228 &lt;/div&gt;
3229 &lt;!-- Tabs --&gt;
3230 &lt;div class=&quot;mdl-layout__tab-bar mdl-js-ripple-effect&quot;&gt;
3231 &lt;a href=&quot;#fixed-tab-1&quot; class=&quot;mdl-layout__tab is-active&quot;&gt;Tab 1&lt;/a&gt;
3232 &lt;a href=&quot;#fixed-tab-2&quot; class=&quot;mdl-layout__tab&quot;&gt;Tab 2&lt;/a&gt;
3233 &lt;a href=&quot;#fixed-tab-3&quot; class=&quot;mdl-layout__tab&quot;&gt;Tab 3&lt;/a&gt;
3234 &lt;/div&gt;
3235 &lt;/header&gt;
3236 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3237 &lt;span class=&quot;mdl-layout-title&quot;&gt;Title&lt;/span&gt;
3238 &lt;/div&gt;
3239 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3240 &lt;section class=&quot;mdl-layout__tab-panel is-active&quot; id=&quot;fixed-tab-1&quot;&gt;
3241 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3242 &lt;/section&gt;
3243 &lt;section class=&quot;mdl-layout__tab-panel&quot; id=&quot;fixed-tab-2&quot;&gt;
3244 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3245 &lt;/section&gt;
3246 &lt;section class=&quot;mdl-layout__tab-panel&quot; id=&quot;fixed-tab-3&quot;&gt;
3247 &lt;div class=&quot;page-content&quot;&gt;&lt;!-- Your content goes here --&gt;&lt;/div&gt;
3248 &lt;/section&gt;
3249 &lt;/main&gt;
3250&lt;/div&gt;
3251</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
3252 </div>
3253</div>
3254
3255
3256 <!-- Adding the demo page -->
3257
3258 <style>
3259
3260 </style>
3261
3262 <script>
3263
3264 </script>
3265
3266
3267 <div class="docs-text-styling docs-readme">
3268
3269
3270
3271
3272<h2 id="introduction">Introduction</h2>
3273<p>The Material Design Lite (MDL) <strong>layout</strong> component is a comprehensive approach to page layout that uses MDL development tenets, allows for efficient use of MDL components, and automatically adapts to different browsers, screen sizes, and devices.</p>
3274<p>Appropriate and accessible layout is a critical feature of all user interfaces, regardless of a site&#39;s content or function. Page design and presentation is therefore an important factor in the overall user experience. See the layout component&#39;s <a href="http://www.google.com/design/spec/layout/principles.html">Material Design specifications page</a> for details.</p>
3275<p>Use of MDL layout principles simplifies the creation of scalable pages by providing reusable components and encourages consistency across environments by establishing recognizable visual elements, adhering to logical structural grids, and maintaining appropriate spacing across multiple platforms and screen sizes. MDL layout is extremely powerful and dynamic, allowing for great consistency in outward appearance and behavior while maintaining development flexibility and ease of use.</p>
3276<h3 id="to-include-a-basic-mdl-layout-component-">To include a basic MDL <strong>layout</strong> component:</h3>
3277<p>&nbsp;1. Code a <code>&lt;div&gt;</code> element. This is the &quot;outer&quot; div that holds the entire layout.</p>
3278<pre><code class="language-markup">&lt;div&gt;
3279&lt;/div&gt;
3280</code></pre>
3281<blockquote>
3282<p><strong>Note:</strong> The layout cannot be applied directly on the <code>&lt;body&gt;</code> element. Always create a nested <code>&lt;div&gt;</code> element.</p>
3283</blockquote>
3284<p>&nbsp;2. Add MDL classes as indicated, separated by spaces, to the div using the <code>class</code> attribute.</p>
3285<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3286&lt;/div&gt;
3287</code></pre>
3288<p>&nbsp;3. Inside the div, code a <code>&lt;header&gt;</code> element. This holds the header row with navigation links that is displayed on large screens, and the menu icon that opens the navigation drawer for smaller screens. Add the MDL class to the header using the <code>class</code> attribute.</p>
3289<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3290 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3291 &lt;/header&gt;
3292&lt;/div&gt;
3293</code></pre>
3294<p>&nbsp;4. Inside the header, add a <code>&lt;div&gt;</code> to produce the menu icon, and include the MDL class as indicated. The div has no content of its own.</p>
3295<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3296 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3297 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3298 &lt;/header&gt;
3299&lt;/div&gt;
3300</code></pre>
3301<p>&nbsp;5. Still inside the header, add another <code>&lt;div&gt;</code> to hold the header row&#39;s content, and include the MDL class as indicated.</p>
3302<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3303 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3304 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3305 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3306 &lt;/div&gt;
3307 &lt;/header&gt;
3308&lt;/div&gt;
3309</code></pre>
3310<p>&nbsp;6. Inside the header row div, add a span containing the layout title, and include the MDL class as indicated.</p>
3311<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3312 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3313 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3314 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3315 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3316 &lt;/div&gt;
3317 &lt;/header&gt;
3318&lt;/div&gt;
3319</code></pre>
3320<p>&nbsp;7. Following the span, add a <code>&lt;div&gt;</code> to align the header&#39;s navigation links to the right, and include the MDL class as indicated.</p>
3321<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3322 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3323 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3324 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3325 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3326 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3327 &lt;/div&gt;
3328 &lt;/header&gt;
3329&lt;/div&gt;
3330</code></pre>
3331<p>&nbsp;8. Following the spacer div, add a <code>&lt;nav&gt;</code> element to contain the header&#39;s navigation links, and include the MDL class as indicated. Inside the nav, add one anchor <code>&lt;a&gt;</code> element for each header link, and include the MDL class as indicated. This completes the layout&#39;s header.</p>
3332<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3333 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3334 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3335 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3336 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3337 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3338 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3339 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 1&lt;/a&gt;
3340 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 2&lt;/a&gt;
3341 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 3&lt;/a&gt;
3342 &lt;/nav&gt;
3343 &lt;/div&gt;
3344 &lt;/header&gt;
3345&lt;/div&gt;
3346</code></pre>
3347<p>&nbsp;9. Following the header, add a <code>&lt;div&gt;</code> element to hold the slide-out drawer&#39;s content, and add the MDL class as indicated. The drawer appears automatically on smaller screens, and may be opened with the menu icon on any screen size.</p>
3348<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3349 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3350 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3351 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3352 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3353 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3354 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3355 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 1&lt;/a&gt;
3356 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 2&lt;/a&gt;
3357 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 3&lt;/a&gt;
3358 &lt;/nav&gt;
3359 &lt;/div&gt;
3360 &lt;/header&gt;
3361 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3362 &lt;/div&gt;
3363&lt;/div&gt;
3364</code></pre>
3365<p>&nbsp;10. Inside the drawer div, add a span containing the layout title (this should match the title in step 5), and include the MDL class as indicated.</p>
3366<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3367 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3368 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3369 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3370 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3371 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3372 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3373 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 1&lt;/a&gt;
3374 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 2&lt;/a&gt;
3375 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 3&lt;/a&gt;
3376 &lt;/nav&gt;
3377 &lt;/div&gt;
3378 &lt;/header&gt;
3379 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3380 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3381 &lt;/div&gt;
3382&lt;/div&gt;
3383</code></pre>
3384<p>&nbsp;11. Following the span, add a <code>&lt;nav&gt;</code> element to contain the drawer&#39;s navigation links, and one anchor <code>&lt;a&gt;</code> element for each drawer link (these should match the links in step 7), and include the MDL classes as indicated. This completes the layout&#39;s drawer.</p>
3385<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3386 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3387 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3388 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3389 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3390 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3391 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3392 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 1&lt;/a&gt;
3393 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 2&lt;/a&gt;
3394 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 3&lt;/a&gt;
3395 &lt;/nav&gt;
3396 &lt;/div&gt;
3397 &lt;/header&gt;
3398 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3399 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3400 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3401 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 1&lt;/a&gt;
3402 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 2&lt;/a&gt;
3403 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 3&lt;/a&gt;
3404 &lt;/nav&gt;
3405 &lt;/div&gt;
3406&lt;/div&gt;
3407</code></pre>
3408<p>&nbsp;12. Finally, following the drawer div, add a <code>&lt;main&gt;</code> element to hold the layout&#39;s primary content, and include the MDL class as indicated. Inside that element, add your desired content.</p>
3409<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3410 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3411 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3412 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3413 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3414 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3415 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3416 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 1&lt;/a&gt;
3417 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 2&lt;/a&gt;
3418 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 3&lt;/a&gt;
3419 &lt;/nav&gt;
3420 &lt;/div&gt;
3421 &lt;/header&gt;
3422 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3423 &lt;span class=&quot;mdl-layout__title&quot;&gt;Simple Layout&lt;/span&gt;
3424 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3425 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 1&lt;/a&gt;
3426 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 2&lt;/a&gt;
3427 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Nav link 3&lt;/a&gt;
3428 &lt;/nav&gt;
3429 &lt;/div&gt;
3430 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3431 &lt;p&gt;Content&lt;/p&gt;
3432 &lt;p&gt;Goes&lt;/p&gt;
3433 &lt;p&gt;Here&lt;/p&gt;
3434 &lt;/main&gt;
3435&lt;/div&gt;
3436</code></pre>
3437<p>The layout component is ready for use.</p>
3438<h4 id="examples">Examples</h4>
3439<p>A layout with a fixed header for larger screens and a collapsible drawer for smaller screens.</p>
3440<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3441 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3442 &lt;div class=&quot;mdl-layout-icon&quot;&gt;&lt;/div&gt;
3443 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3444 &lt;span class=&quot;mdl-layout__title&quot;&gt;Material Design Lite&lt;/span&gt;
3445 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3446 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3447 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Hello&lt;/a&gt;
3448 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;World.&lt;/a&gt;
3449 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;How&lt;/a&gt;
3450 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Are&lt;/a&gt;
3451 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;You?&lt;/a&gt;
3452 &lt;/nav&gt;
3453 &lt;/div&gt;
3454 &lt;/header&gt;
3455 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3456 &lt;span class=&quot;mdl-layout__title&quot;&gt;Material Design Lite&lt;/span&gt;
3457 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3458 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Hello&lt;/a&gt;
3459 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;World.&lt;/a&gt;
3460 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;How&lt;/a&gt;
3461 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Are&lt;/a&gt;
3462 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;You?&lt;/a&gt;
3463 &lt;/nav&gt;
3464 &lt;/div&gt;
3465 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3466 &lt;div&gt;Content&lt;/div&gt;
3467 &lt;/main&gt;
3468&lt;/div&gt;
3469</code></pre>
3470<p>The same layout with a non-fixed header that scrolls with the content.</p>
3471<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout&quot;&gt;
3472 &lt;header class=&quot;mdl-layout__header mdl-layout__header--scroll&quot;&gt;
3473 &lt;img class=&quot;mdl-layout-icon&quot;&gt;&lt;/img&gt;
3474 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3475 &lt;span class=&quot;mdl-layout__title&quot;&gt;Material Design Lite&lt;/span&gt;
3476 &lt;div class=&quot;mdl-layout-spacer&quot;&gt;&lt;/div&gt;
3477 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3478 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Hello&lt;/a&gt;
3479 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;World.&lt;/a&gt;
3480 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;How&lt;/a&gt;
3481 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Are&lt;/a&gt;
3482 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;You?&lt;/a&gt;
3483 &lt;/nav&gt;
3484 &lt;/div&gt;
3485 &lt;/header&gt;
3486 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3487 &lt;span class=&quot;mdl-layout__title&quot;&gt;Material Design Lite&lt;/span&gt;
3488 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3489 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Hello&lt;/a&gt;
3490 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;World.&lt;/a&gt;
3491 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;How&lt;/a&gt;
3492 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Are&lt;/a&gt;
3493 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;You?&lt;/a&gt;
3494 &lt;/nav&gt;
3495 &lt;/div&gt;
3496 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3497 &lt;div&gt;Content&lt;/div&gt;
3498 &lt;/main&gt;
3499&lt;/div&gt;
3500</code></pre>
3501<p>A layout with a fixed drawer that serves as sidebar navigation on larger screens. The drawer collapses and the menu icon is displayed on smaller screens.</p>
3502<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout mdl-layout--fixed-drawer&quot;&gt;
3503 &lt;header class=&quot;mdl-layout__header&quot;&gt;
3504 &lt;div class=&quot;mdl-layout__header-row&quot;&gt;
3505 &lt;span class=&quot;mdl-layout__title&quot;&gt;Fixed drawer layout demo&lt;/span&gt;
3506 &lt;/div&gt;
3507 &lt;/header&gt;
3508 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3509 &lt;span class=&quot;mdl-layout__title&quot;&gt;Material Design Lite&lt;/span&gt;
3510 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3511 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Hello&lt;/a&gt;
3512 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;World.&lt;/a&gt;
3513 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;How&lt;/a&gt;
3514 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Are&lt;/a&gt;
3515 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;You?&lt;/a&gt;
3516 &lt;/nav&gt;
3517 &lt;/div&gt;
3518 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3519 &lt;div&gt;Content&lt;/div&gt;
3520 &lt;/main&gt;
3521&lt;/div&gt;
3522</code></pre>
3523<p>A layout with a fixed drawer but no header.</p>
3524<pre><code class="language-markup">&lt;div class=&quot;mdl-layout mdl-js-layout mdl-layout--fixed-drawer&quot;&gt;
3525 &lt;div class=&quot;mdl-layout__drawer&quot;&gt;
3526 &lt;span class=&quot;mdl-layout__title&quot;&gt;Material Design Lite&lt;/span&gt;
3527 &lt;nav class=&quot;mdl-navigation&quot;&gt;
3528 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Hello&lt;/a&gt;
3529 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;World.&lt;/a&gt;
3530 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;How&lt;/a&gt;
3531 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;Are&lt;/a&gt;
3532 &lt;a class=&quot;mdl-navigation__link&quot; href=&quot;#&quot;&gt;You?&lt;/a&gt;
3533 &lt;/nav&gt;
3534 &lt;/div&gt;
3535 &lt;main class=&quot;mdl-layout__content&quot;&gt;
3536 &lt;div&gt;Content&lt;/div&gt;
3537 &lt;/main&gt;
3538&lt;/div&gt;
3539</code></pre>
3540<h2 id="configuration-options">Configuration options</h2>
3541<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the layout. The table below lists the available classes and their effects.</p>
3542<table>
3543<thead>
3544<tr>
3545<th>MDL class</th>
3546<th>Effect</th>
3547<th>Remarks</th>
3548</tr>
3549</thead>
3550<tbody>
3551<tr>
3552<td><code>mdl-layout</code></td>
3553<td>Defines container as an MDL component</td>
3554<td>Required on outer div element</td>
3555</tr>
3556<tr>
3557<td><code>mdl-js-layout</code></td>
3558<td>Assigns basic MDL behavior to layout</td>
3559<td>Required on outer div element</td>
3560</tr>
3561<tr>
3562<td><code>mdl-layout__header</code></td>
3563<td>Defines container as an MDL component</td>
3564<td>Required on header element</td>
3565</tr>
3566<tr>
3567<td><code>mdl-layout-icon</code></td>
3568<td>Used for adding an application icon. Gets concealed by menu icon if both are visible.</td>
3569<td>Goes on optional icon element</td>
3570</tr>
3571<tr>
3572<td><code>mdl-layout__header-row</code></td>
3573<td>Defines container as MDL header row</td>
3574<td>Required on header content div</td>
3575</tr>
3576<tr>
3577<td><code>mdl-layout__title</code></td>
3578<td>Defines layout title text</td>
3579<td>Required on layout title span</td>
3580</tr>
3581<tr>
3582<td><code>mdl-layout-spacer</code></td>
3583<td>Used to align elements inside a header or drawer, by growing to fill remaining space. Commonly used for aligning elements to the right.</td>
3584<td>Goes on optional div following layout title</td>
3585</tr>
3586<tr>
3587<td><code>mdl-navigation</code></td>
3588<td>Defines container as MDL navigation group</td>
3589<td>Required on nav element</td>
3590</tr>
3591<tr>
3592<td><code>mdl-navigation__link</code></td>
3593<td>Defines anchor as MDL navigation link</td>
3594<td>Required on header and/or drawer anchor elements</td>
3595</tr>
3596<tr>
3597<td><code>mdl-layout__drawer</code></td>
3598<td>Defines container as MDL layout drawer</td>
3599<td>Required on drawer div element</td>
3600</tr>
3601<tr>
3602<td><code>mdl-layout__content</code></td>
3603<td>Defines container as MDL layout content</td>
3604<td>Required on main element</td>
3605</tr>
3606<tr>
3607<td><code>mdl-layout__header--scroll</code></td>
3608<td>Makes the header scroll with the content</td>
3609<td>Optional; goes on header element</td>
3610</tr>
3611<tr>
3612<td><code>mdl-layout--fixed-drawer</code></td>
3613<td>Makes the drawer always visible and open in larger screens</td>
3614<td>Optional; goes on outer div element (not drawer div element)</td>
3615</tr>
3616<tr>
3617<td><code>mdl-layout--fixed-header</code></td>
3618<td>Makes the header always visible, even in small screens</td>
3619<td>Optional; goes on outer div element</td>
3620</tr>
3621<tr>
3622<td><code>mdl-layout--no-drawer-button</code></td>
3623<td>Does not display a drawer button</td>
3624<td>Optional; goes on <code>mdl-layout</code> element</td>
3625</tr>
3626<tr>
3627<td><code>mdl-layout--no-desktop-drawer-button</code></td>
3628<td>Does not display a drawer button in desktop mode</td>
3629<td>Optional; goes on <code>mdl-layout</code> element</td>
3630</tr>
3631<tr>
3632<td><code>mdl-layout--large-screen-only</code></td>
3633<td>Hides an element on smaller screens</td>
3634<td>Optional; goes on any descendant of <code>mdl-layout</code></td>
3635</tr>
3636<tr>
3637<td><code>mdl-layout--small-screen-only</code></td>
3638<td>Hides an element on larger screens</td>
3639<td>Optional; goes on any descendant of <code>mdl-layout</code></td>
3640</tr>
3641<tr>
3642<td><code>mdl-layout__header--waterfall</code></td>
3643<td>Allows a &quot;waterfall&quot; effect with multiple header lines</td>
3644<td>Optional; goes on header element</td>
3645</tr>
3646<tr>
3647<td><code>mdl-layout__header--waterfall-hide-top</code></td>
3648<td>Hides the top rather than the bottom rows on a waterfall header</td>
3649<td>Optional; goes on header element. Requires <code>mdl-layout__header--waterfall</code></td>
3650</tr>
3651<tr>
3652<td><code>mdl-layout__header--transparent</code></td>
3653<td>Makes header transparent (draws on top of layout background)</td>
3654<td>Optional; goes on header element</td>
3655</tr>
3656<tr>
3657<td><code>mdl-layout__header--seamed</code></td>
3658<td>Uses a header without a shadow</td>
3659<td>Optional; goes on header element</td>
3660</tr>
3661<tr>
3662<td><code>mdl-layout__tab-bar</code></td>
3663<td>Defines container as an MDL tab bar</td>
3664<td>Required on div element inside header (tabbed layout)</td>
3665</tr>
3666<tr>
3667<td><code>mdl-layout__tab</code></td>
3668<td>Defines anchor as MDL tab link</td>
3669<td>Required on tab bar anchor elements</td>
3670</tr>
3671<tr>
3672<td><code>is-active</code></td>
3673<td>Defines tab as default active tab</td>
3674<td>Optional; goes on tab bar anchor element and associated tab section element</td>
3675</tr>
3676<tr>
3677<td><code>mdl-layout__tab-panel</code></td>
3678<td>Defines container as tab content panel</td>
3679<td>Required on tab section elements</td>
3680</tr>
3681<tr>
3682<td><code>mdl-layout__tab-manual-switch</code></td>
3683<td>Disables tab switching when clicking on tab separators. Useful for disabling default behavior and setting up your own event listeners.</td>
3684<td>Optional; goes on tab bar element</td>
3685</tr>
3686<tr>
3687<td><code>mdl-layout--fixed-tabs</code></td>
3688<td>Uses fixed tabs instead of the default scrollable tabs</td>
3689<td>Optional; goes on outer div element (not div inside header)</td>
3690</tr>
3691</tbody>
3692</table>
3693
3694
3695
3696 </div>
3697
3698
3699
3700 <span class="docs-text-styling">
3701 <h1 class="mdl-components__classname" id="layout-section/grid">Grid</h1>
3702 </span>
3703
3704 <!-- Add warning, if the component has one -->
3705
3706 <!-- Generating snippets -->
3707
3708
3709
3710<div class="snippet-group is-full-width">
3711
3712 <div class="snippet-header">
3713 <div class="snippet-demos">
3714 <div class="snippet-demo-padding"></div>
3715
3716
3717
3718
3719 <div class="snippet-demo">
3720 <div class="snippet-demo-container demo-grid demo-grid__grid">
3721 <style>
3722.demo-grid .mdl-cell {
3723 box-sizing: border-box;
3724 background-color: #BDBDBD;
3725 height: 200px;
3726 padding-left: 8px;
3727 padding-top: 4px;
3728 color: white;
3729}
3730.demo-grid .mdl-grid:first-of-type .mdl-cell {
3731 height: 50px;
3732}
3733</style>
3734
3735<div class="mdl-grid">
3736 <div class="mdl-cell mdl-cell--1-col">1</div>
3737 <div class="mdl-cell mdl-cell--1-col">1</div>
3738 <div class="mdl-cell mdl-cell--1-col">1</div>
3739 <div class="mdl-cell mdl-cell--1-col">1</div>
3740 <div class="mdl-cell mdl-cell--1-col">1</div>
3741 <div class="mdl-cell mdl-cell--1-col">1</div>
3742 <div class="mdl-cell mdl-cell--1-col">1</div>
3743 <div class="mdl-cell mdl-cell--1-col">1</div>
3744 <div class="mdl-cell mdl-cell--1-col">1</div>
3745 <div class="mdl-cell mdl-cell--1-col">1</div>
3746 <div class="mdl-cell mdl-cell--1-col">1</div>
3747 <div class="mdl-cell mdl-cell--1-col">1</div>
3748</div>
3749<div class="mdl-grid">
3750 <div class="mdl-cell mdl-cell--4-col">4</div>
3751 <div class="mdl-cell mdl-cell--4-col">4</div>
3752 <div class="mdl-cell mdl-cell--4-col">4</div>
3753</div>
3754<div class="mdl-grid">
3755 <div class="mdl-cell mdl-cell--6-col">6</div>
3756 <div class="mdl-cell mdl-cell--4-col">4</div>
3757 <div class="mdl-cell mdl-cell--2-col">2</div>
3758</div>
3759<div class="mdl-grid">
3760 <div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet">6 (8 tablet)</div>
3761 <div class="mdl-cell mdl-cell--4-col mdl-cell--6-col-tablet">4 (6 tablet)</div>
3762 <div class="mdl-cell mdl-cell--2-col mdl-cell--4-col-phone">2 (4 phone)</div>
3763</div>
3764
3765
3766 </div>
3767 </div>
3768 <div class="snippet-demo-padding"></div>
3769 </div>
3770 <div class="snippet-captions">
3771 <div class="snippet-caption-padding"></div>
3772
3773 <div class="snippet-caption">
3774 Responsive grid
3775 </div>
3776 <div class="snippet-caption-padding"></div>
3777 </div>
3778 </div>
3779 <div class="snippet-code">
3780 <pre class="language-markup codepen-button-enabled"><code id="grid/grid.html">&lt;div class=&quot;mdl-grid&quot;&gt;
3781 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3782 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3783 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3784 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3785 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3786 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3787 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3788 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3789 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3790 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3791 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3792 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;1&lt;/div&gt;
3793&lt;/div&gt;
3794&lt;div class=&quot;mdl-grid&quot;&gt;
3795 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;4&lt;/div&gt;
3796 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;4&lt;/div&gt;
3797 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;4&lt;/div&gt;
3798&lt;/div&gt;
3799&lt;div class=&quot;mdl-grid&quot;&gt;
3800 &lt;div class=&quot;mdl-cell mdl-cell--6-col&quot;&gt;6&lt;/div&gt;
3801 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;4&lt;/div&gt;
3802 &lt;div class=&quot;mdl-cell mdl-cell--2-col&quot;&gt;2&lt;/div&gt;
3803&lt;/div&gt;
3804&lt;div class=&quot;mdl-grid&quot;&gt;
3805 &lt;div class=&quot;mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet&quot;&gt;6 (8 tablet)&lt;/div&gt;
3806 &lt;div class=&quot;mdl-cell mdl-cell--4-col mdl-cell--6-col-tablet&quot;&gt;4 (6 tablet)&lt;/div&gt;
3807 &lt;div class=&quot;mdl-cell mdl-cell--2-col mdl-cell--4-col-phone&quot;&gt;2 (4 phone)&lt;/div&gt;
3808&lt;/div&gt;
3809</code><div class="codepen-extra-css">&lt;style&gt;.mdl-cell {
3810 box-sizing: border-box;
3811 background-color: #BDBDBD;
3812 height: 200px;
3813 padding-left: 8px;
3814 padding-top: 4px;
3815 color: white;
3816}
3817.mdl-grid:first-of-type .mdl-cell {
3818 height: 50px;
3819}
3820&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
3821 </div>
3822</div>
3823
3824
3825 <!-- Adding the demo page -->
3826
3827 <style>
3828
3829 </style>
3830
3831 <script>
3832
3833 </script>
3834
3835
3836 <div class="docs-text-styling docs-readme">
3837
3838
3839
3840
3841<h2 id="introduction">Introduction</h2>
3842<p>The Material Design Lite (MDL) <strong>grid</strong> component is a simplified method for laying out content for multiple screen sizes. It reduces the usual coding burden required to correctly display blocks of content in a variety of display conditions.</p>
3843<p>The MDL grid is defined and enclosed by a container element. A grid has 12 columns in the desktop screen size, 8 in the tablet size, and 4 in the phone size, each size having predefined margins and gutters. Cells are laid out sequentially in a row, in the order they are defined, with some exceptions:</p>
3844<ul>
3845<li>If a cell doesn&#39;t fit in the row in one of the screen sizes, it flows into the following line.</li>
3846<li>If a cell has a specified column size equal to or larger than the number of columns for the current screen size, it takes up the entirety of its row.</li>
3847</ul>
3848<p>You can set a maximum grid width, after which the grid stays centered with padding on either side, by setting its <code>max-width</code> CSS property.</p>
3849<p>Grids are a fairly new and non-standardized feature in most user interfaces, and provide users with a way to view content in an organized manner that might otherwise be difficult to understand or retain. Their design and use is an important factor in the overall user experience.</p>
3850<h3 id="to-include-an-mdl-grid-component-">To include an MDL <strong>grid</strong> component:</h3>
3851<p>&nbsp;1. Code a <code>&lt;div&gt;</code> element; this is the &quot;outer&quot; container, intended to hold all of the grid&#39;s cells. Style the div as desired (colors, font size, etc.).</p>
3852<pre><code class="language-markup">&lt;div&gt;
3853&lt;/div&gt;
3854</code></pre>
3855<p>&nbsp;2. Add the <code>mdl-grid</code> MDL class to the div using the <code>class</code> attribute.</p>
3856<pre><code>&lt;div class=&quot;mdl-grid&quot;&gt;
3857&lt;/div&gt;
3858</code></pre><p>&nbsp;3. For each cell, code one &quot;inner&quot; div, including the text to be displayed.</p>
3859<pre><code class="language-markup">&lt;div class=&quot;mdl-grid&quot;&gt;
3860 &lt;div&gt;Content&lt;/div&gt;
3861 &lt;div&gt;goes&lt;/div&gt;
3862 &lt;div&gt;here&lt;/div&gt;
3863&lt;/div&gt;
3864</code></pre>
3865<p>&nbsp;4. Add the <code>mdl-cell</code> class and an <code>mdl-cell--COLUMN-col</code> class, where COLUMN specifies the column size for the cell, to the &quot;inner&quot; divs using the <code>class</code> attribute.</p>
3866<pre><code class="language-markup">&lt;div class=&quot;mdl-grid&quot;&gt;
3867 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;Content&lt;/div&gt;
3868 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;goes&lt;/div&gt;
3869 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;here&lt;/div&gt;
3870&lt;/div&gt;
3871</code></pre>
3872<p>&nbsp;5. Optionally add an <code>mdl-cell--COLUMN-col-DEVICE</code> class, where COLUMN specifies the column size for the cell on a specific device, and DEVICE specifies the device type.</p>
3873<pre><code class="language-markup">&lt;div class=&quot;mdl-grid&quot;&gt;
3874 &lt;div class=&quot;mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet&quot;&gt;Content&lt;/div&gt;
3875 &lt;div class=&quot;mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet&quot;&gt;goes&lt;/div&gt;
3876 &lt;div class=&quot;mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet&quot;&gt;here&lt;/div&gt;
3877&lt;/div&gt;
3878</code></pre>
3879<p>The grid component is ready for use.</p>
3880<h4 id="examples">Examples</h4>
3881<p>A grid with five cells of column size 1.</p>
3882<pre><code class="language-markup">&lt;div class=&quot;mdl-grid&quot;&gt;
3883 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;CS 1&lt;/div&gt;
3884 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;CS 1&lt;/div&gt;
3885 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;CS 1&lt;/div&gt;
3886 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;CS 1&lt;/div&gt;
3887 &lt;div class=&quot;mdl-cell mdl-cell--1-col&quot;&gt;CS 1&lt;/div&gt;
3888&lt;/div&gt;
3889</code></pre>
3890<p>A grid with three cells, one of column size 6, one of column size 4, and one of column size 2.</p>
3891<pre><code class="language-markup">&lt;div class=&quot;mdl-grid&quot;&gt;
3892 &lt;div class=&quot;mdl-cell mdl-cell--6-col&quot;&gt;CS 6&lt;/div&gt;
3893 &lt;div class=&quot;mdl-cell mdl-cell--4-col&quot;&gt;CS 4&lt;/div&gt;
3894 &lt;div class=&quot;mdl-cell mdl-cell--2-col&quot;&gt;CS 2&lt;/div&gt;
3895&lt;/div&gt;
3896</code></pre>
3897<p>A grid with three cells of column size 6 that will display as column size 8 on a tablet device.</p>
3898<pre><code class="language-markup">&lt;div class=&quot;mdl-grid&quot;&gt;
3899 &lt;div class=&quot;mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet&quot;&gt;CS 6 (8 on tablet)&lt;/div&gt;
3900 &lt;div class=&quot;mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet&quot;&gt;CS 6 (8 on tablet)&lt;/div&gt;
3901 &lt;div class=&quot;mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet&quot;&gt;CS 6 (8 on tablet)&lt;/div&gt;
3902&lt;/div&gt;
3903</code></pre>
3904<p>A grid with four cells of column size 2 that will display as column size 4 on a phone device.</p>
3905<pre><code class="language-markup">&lt;div class=&quot;mdl-grid&quot;&gt;
3906 &lt;div class=&quot;mdl-cell mdl-cell--2-col mdl-cell--4-col-phone&quot;&gt;CS 2 (4 on phone)&lt;/div&gt;
3907 &lt;div class=&quot;mdl-cell mdl-cell--2-col mdl-cell--4-col-phone&quot;&gt;CS 2 (4 on phone)&lt;/div&gt;
3908 &lt;div class=&quot;mdl-cell mdl-cell--2-col mdl-cell--4-col-phone&quot;&gt;CS 2 (4 on phone)&lt;/div&gt;
3909 &lt;div class=&quot;mdl-cell mdl-cell--2-col mdl-cell--4-col-phone&quot;&gt;CS 2 (4 on phone)&lt;/div&gt;
3910&lt;/div&gt;
3911</code></pre>
3912<h2 id="configuration-options">Configuration options</h2>
3913<p>The MDL CSS classes apply various predefined visual enhancements and behavioral effects to the grid. The table below lists the available classes and their effects.</p>
3914<table>
3915<thead>
3916<tr>
3917<th>MDL class</th>
3918<th>Effect</th>
3919<th>Remarks</th>
3920</tr>
3921</thead>
3922<tbody>
3923<tr>
3924<td><code>mdl-grid</code></td>
3925<td>Defines a container as an MDL grid component</td>
3926<td>Required on &quot;outer&quot; div element</td>
3927</tr>
3928<tr>
3929<td><code>mdl-cell</code></td>
3930<td>Defines a container as an MDL cell</td>
3931<td>Required on &quot;inner&quot; div elements</td>
3932</tr>
3933<tr>
3934<td><code>mdl-grid--no-spacing</code></td>
3935<td>Modifies the grid cells to have no margin between them.</td>
3936<td>Optional on grid container.</td>
3937</tr>
3938<tr>
3939<td><code>mdl-cell--N-col</code></td>
3940<td>Sets the column size for the cell to N</td>
3941<td>N is 1-12 inclusive, defaults to 4; optional on &quot;inner&quot; div elements</td>
3942</tr>
3943<tr>
3944<td><code>mdl-cell--N-col-desktop</code></td>
3945<td>Sets the column size for the cell to N in desktop mode only</td>
3946<td>N is 1-12 inclusive; optional on &quot;inner&quot; div elements</td>
3947</tr>
3948<tr>
3949<td><code>mdl-cell--N-col-tablet</code></td>
3950<td>Sets the column size for the cell to N in tablet mode only</td>
3951<td>N is 1-8 inclusive; optional on &quot;inner&quot; div elements</td>
3952</tr>
3953<tr>
3954<td><code>mdl-cell--N-col-phone</code></td>
3955<td>Sets the column size for the cell to N in phone mode only</td>
3956<td>N is 1-4 inclusive; optional on &quot;inner&quot; div elements</td>
3957</tr>
3958<tr>
3959<td><code>mdl-cell--N-offset</code></td>
3960<td>Adds N columns of whitespace before the cell</td>
3961<td>N is 1-11 inclusive; optional on &quot;inner&quot; div elements</td>
3962</tr>
3963<tr>
3964<td><code>mdl-cell--N-offset-desktop</code></td>
3965<td>Adds N columns of whitespace before the cell in desktop mode</td>
3966<td>N is 1-11 inclusive; optional on &quot;inner&quot; div elements</td>
3967</tr>
3968<tr>
3969<td><code>mdl-cell--N-offset-tablet</code></td>
3970<td>Adds N columns of whitespace before the cell in tablet mode</td>
3971<td>N is 1-7 inclusive; optional on &quot;inner&quot; div elements</td>
3972</tr>
3973<tr>
3974<td><code>mdl-cell--N-offset-phone</code></td>
3975<td>Adds N columns of whitespace before the cell in phone mode</td>
3976<td>N is 1-3 inclusive; optional on &quot;inner&quot; div elements</td>
3977</tr>
3978<tr>
3979<td><code>mdl-cell--order-N</code></td>
3980<td>Reorders cell to position N</td>
3981<td>N is 1-12 inclusive; optional on &quot;inner&quot; div elements</td>
3982</tr>
3983<tr>
3984<td><code>mdl-cell--order-N-desktop</code></td>
3985<td>Reorders cell to position N when in desktop mode</td>
3986<td>N is 1-12 inclusive; optional on &quot;inner&quot; div elements</td>
3987</tr>
3988<tr>
3989<td><code>mdl-cell--order-N-tablet</code></td>
3990<td>Reorders cell to position N when in tablet mode</td>
3991<td>N is 1-12 inclusive; optional on &quot;inner&quot; div elements</td>
3992</tr>
3993<tr>
3994<td><code>mdl-cell--order-N-phone</code></td>
3995<td>Reorders cell to position N when in phone mode</td>
3996<td>N is 1-12 inclusive; optional on &quot;inner&quot; div elements</td>
3997</tr>
3998<tr>
3999<td><code>mdl-cell--hide-desktop</code></td>
4000<td>Hides the cell when in desktop mode</td>
4001<td>Optional on &quot;inner&quot; div elements</td>
4002</tr>
4003<tr>
4004<td><code>mdl-cell--hide-tablet</code></td>
4005<td>Hides the cell when in tablet mode</td>
4006<td>Optional on &quot;inner&quot; div elements</td>
4007</tr>
4008<tr>
4009<td><code>mdl-cell--hide-phone</code></td>
4010<td>Hides the cell when in phone mode</td>
4011<td>Optional on &quot;inner&quot; div elements</td>
4012</tr>
4013<tr>
4014<td><code>mdl-cell--stretch</code></td>
4015<td>Stretches the cell vertically to fill the parent</td>
4016<td>Default; optional on &quot;inner&quot; div elements</td>
4017</tr>
4018<tr>
4019<td><code>mdl-cell--top</code></td>
4020<td>Aligns the cell to the top of the parent</td>
4021<td>Optional on &quot;inner&quot; div elements</td>
4022</tr>
4023<tr>
4024<td><code>mdl-cell--middle</code></td>
4025<td>Aligns the cell to the middle of the parent</td>
4026<td>Optional on &quot;inner&quot; div elements</td>
4027</tr>
4028<tr>
4029<td><code>mdl-cell--bottom</code></td>
4030<td>Aligns the cell to the bottom of the parent</td>
4031<td>Optional on &quot;inner&quot; div elements</td>
4032</tr>
4033</tbody>
4034</table>
4035
4036
4037
4038 </div>
4039
4040
4041
4042 <span class="docs-text-styling">
4043 <h1 class="mdl-components__classname" id="layout-section/tabs">Tabs</h1>
4044 </span>
4045
4046 <!-- Add warning, if the component has one -->
4047
4048 <!-- Generating snippets -->
4049
4050
4051
4052<div class="snippet-group">
4053
4054 <div class="snippet-header">
4055 <div class="snippet-demos">
4056 <div class="snippet-demo-padding"></div>
4057
4058
4059
4060
4061 <div class="snippet-demo">
4062 <div class="snippet-demo-container demo-tabs demo-tabs__tabs">
4063 <div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
4064 <div class="mdl-tabs__tab-bar">
4065 <a href="#starks-panel" class="mdl-tabs__tab is-active">Starks</a>
4066 <a href="#lannisters-panel" class="mdl-tabs__tab">Lannisters</a>
4067 <a href="#targaryens-panel" class="mdl-tabs__tab">Targaryens</a>
4068 </div>
4069
4070 <div class="mdl-tabs__panel is-active" id="starks-panel">
4071 <ul>
4072 <li>Eddard</li>
4073 <li>Catelyn</li>
4074 <li>Robb</li>
4075 <li>Sansa</li>
4076 <li>Brandon</li>
4077 <li>Arya</li>
4078 <li>Rickon</li>
4079 </ul>
4080 </div>
4081 <div class="mdl-tabs__panel" id="lannisters-panel">
4082 <ul>
4083 <li>Tywin</li>
4084 <li>Cersei</li>
4085 <li>Jamie</li>
4086 <li>Tyrion</li>
4087 </ul>
4088 </div>
4089 <div class="mdl-tabs__panel" id="targaryens-panel">
4090 <ul>
4091 <li>Viserys</li>
4092 <li>Daenerys</li>
4093 </ul>
4094 </div>
4095</div>
4096
4097 </div>
4098 </div>
4099 <div class="snippet-demo-padding"></div>
4100 </div>
4101 <div class="snippet-captions">
4102 <div class="snippet-caption-padding"></div>
4103
4104 <div class="snippet-caption">
4105 Content tabs
4106 </div>
4107 <div class="snippet-caption-padding"></div>
4108 </div>
4109 </div>
4110 <div class="snippet-code">
4111 <pre class="language-markup codepen-button-enabled"><code id="tabs/tabs.html">&lt;div class=&quot;mdl-tabs mdl-js-tabs mdl-js-ripple-effect&quot;&gt;
4112 &lt;div class=&quot;mdl-tabs__tab-bar&quot;&gt;
4113 &lt;a href=&quot;#starks-panel&quot; class=&quot;mdl-tabs__tab is-active&quot;&gt;Starks&lt;/a&gt;
4114 &lt;a href=&quot;#lannisters-panel&quot; class=&quot;mdl-tabs__tab&quot;&gt;Lannisters&lt;/a&gt;
4115 &lt;a href=&quot;#targaryens-panel&quot; class=&quot;mdl-tabs__tab&quot;&gt;Targaryens&lt;/a&gt;
4116 &lt;/div&gt;
4117
4118 &lt;div class=&quot;mdl-tabs__panel is-active&quot; id=&quot;starks-panel&quot;&gt;
4119 &lt;ul&gt;
4120 &lt;li&gt;Eddard&lt;/li&gt;
4121 &lt;li&gt;Catelyn&lt;/li&gt;
4122 &lt;li&gt;Robb&lt;/li&gt;
4123 &lt;li&gt;Sansa&lt;/li&gt;
4124 &lt;li&gt;Brandon&lt;/li&gt;
4125 &lt;li&gt;Arya&lt;/li&gt;
4126 &lt;li&gt;Rickon&lt;/li&gt;
4127 &lt;/ul&gt;
4128 &lt;/div&gt;
4129 &lt;div class=&quot;mdl-tabs__panel&quot; id=&quot;lannisters-panel&quot;&gt;
4130 &lt;ul&gt;
4131 &lt;li&gt;Tywin&lt;/li&gt;
4132 &lt;li&gt;Cersei&lt;/li&gt;
4133 &lt;li&gt;Jamie&lt;/li&gt;
4134 &lt;li&gt;Tyrion&lt;/li&gt;
4135 &lt;/ul&gt;
4136 &lt;/div&gt;
4137 &lt;div class=&quot;mdl-tabs__panel&quot; id=&quot;targaryens-panel&quot;&gt;
4138 &lt;ul&gt;
4139 &lt;li&gt;Viserys&lt;/li&gt;
4140 &lt;li&gt;Daenerys&lt;/li&gt;
4141 &lt;/ul&gt;
4142 &lt;/div&gt;
4143&lt;/div&gt;
4144</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
4145body {
4146 padding: 20px;
4147 background: #fafafa;
4148 position: relative;
4149}
4150&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
4151 </div>
4152</div>
4153
4154
4155 <!-- Adding the demo page -->
4156
4157 <style>
4158
4159 </style>
4160
4161 <script>
4162
4163 </script>
4164
4165
4166 <div class="docs-text-styling docs-readme">
4167
4168
4169
4170
4171<h2 id="introduction">Introduction</h2>
4172<p>The Material Design Lite (MDL) <strong>tab</strong> component is a user interface element that allows different content blocks to share the same screen space in a mutually exclusive manner. Tabs are always presented in sets of two or more, and they make it easy to explore and switch among different views or functional aspects of an app, or to browse categorized data sets individually. Tabs serve as &quot;headings&quot; for their respective content; the <em>active</em> tab &mdash; the one whose content is currently displayed &mdash; is always visually distinguished from the others so the user knows which heading the current content belongs to.</p>
4173<p>Tabs are an established but non-standardized feature in user interfaces, and allow users to view different, but often related, blocks of content (often called <em>panels</em>). Tabs save screen real estate and provide intuitive and logical access to data while reducing navigation and associated user confusion. Their design and use is an important factor in the overall user experience. See the tab component&#39;s <a href="http://www.google.com/design/spec/components/tabs.html">Material Design specifications page</a> for details.</p>
4174<h3 id="to-include-a-set-of-mdl-tab-components-">To include a set of MDL <strong>tab</strong> components:</h3>
4175<p>&nbsp;1. Code a <code>&lt;div&gt;</code> element; this is the &quot;outer&quot; div, intended to contain all of the tabs and their content.</p>
4176<pre><code class="language-markup">&lt;div&gt;
4177&lt;/div&gt;
4178</code></pre>
4179<p>&nbsp;2. Inside the &quot;outer&quot; div, code one &quot;inner&quot; div for the tabs themselves, and one for each tab&#39;s content, all siblings. That is, for three content tabs, you would code four &quot;inner&quot; divs.</p>
4180<pre><code class="language-markup">&lt;div&gt;
4181 &lt;div&gt;
4182 ...
4183 &lt;/div&gt;
4184 &lt;div&gt;
4185 ...
4186 &lt;/div&gt;
4187 &lt;div&gt;
4188 ...
4189 &lt;/div&gt;
4190 &lt;div&gt;
4191 ...
4192 &lt;/div&gt;
4193&lt;/div&gt;
4194</code></pre>
4195<p>&nbsp;3. Inside the first &quot;inner&quot; div (the tabs), code one anchor <code>&lt;a&gt;</code> (link) tag for each tab. Include <code>href</code> attributes with values to match the tabs&#39; <code>id</code> attribute values, and some brief link text. On the remaining &quot;inner&quot; divs (the content), code <code>id</code> attributes whose values match the links&#39; <code>href</code>s.</p>
4196<pre><code class="language-markup">&lt;div&gt;
4197 &lt;div&gt;
4198 &lt;a href=&quot;#tab1&quot;&gt;Tab One&lt;/a&gt;
4199 &lt;a href=&quot;#tab2&quot;&gt;Tab Two&lt;/a&gt;
4200 &lt;a href=&quot;#tab3&quot;&gt;Tab Three&lt;/a&gt;
4201 &lt;/div&gt;
4202 &lt;div id=&quot;tab1&quot;&gt;
4203 ...
4204 &lt;/div&gt;
4205 &lt;div id=&quot;tab2&quot;&gt;
4206 ...
4207 &lt;/div&gt;
4208 &lt;div id=&quot;tab3&quot;&gt;
4209 ...
4210 &lt;/div&gt;
4211&lt;/div&gt;
4212</code></pre>
4213<p>&nbsp;4. Inside the remaining &quot;inner&quot; divs, code the content you intend to display in each panel; use standard HTML tags to structure the content as desired.</p>
4214<pre><code class="language-markup">&lt;div&gt;
4215 &lt;div&gt;
4216 &lt;a href=&quot;#tab1&quot;&gt;Tab One&lt;/a&gt;
4217 &lt;a href=&quot;#tab2&quot;&gt;Tab Two&lt;/a&gt;
4218 &lt;a href=&quot;#tab3&quot;&gt;Tab Three&lt;/a&gt;
4219 &lt;/div&gt;
4220 &lt;div id=&quot;tab1&quot;&gt;
4221 &lt;p&gt;First tab&#39;s content.&lt;/p&gt;
4222 &lt;/div&gt;
4223 &lt;div id=&quot;tab2&quot;&gt;
4224 &lt;p&gt;Second tab&#39;s content.&lt;/p&gt;
4225 &lt;/div&gt;
4226 &lt;div id=&quot;tab3&quot;&gt;
4227 &lt;p&gt;Third tab&#39;s content.&lt;/p&gt;
4228 &lt;/div&gt;
4229&lt;/div&gt;
4230</code></pre>
4231<p>&nbsp;5. Add one or more MDL classes, separated by spaces, to the &quot;outer&quot; and &quot;inner&quot; divs using the <code>class</code> attribute; be sure to include the <code>is-active</code> class on the tab you want to be displayed by default.</p>
4232<pre><code class="language-markup">&lt;div class=&quot;mdl-tabs mdl-js-tabs&quot;&gt;
4233 &lt;div class=&quot;mdl-tabs__tab-bar&quot;&gt;
4234 &lt;a href=&quot;#tab1&quot; class=&quot;mdl-tabs__tab&quot;&gt;Tab One&lt;/a&gt;
4235 &lt;a href=&quot;#tab2&quot; class=&quot;mdl-tabs__tab&quot;&gt;Tab Two&lt;/a&gt;
4236 &lt;a href=&quot;#tab3&quot; class=&quot;mdl-tabs__tab&quot;&gt;Tab Three&lt;/a&gt;
4237 &lt;/div&gt;
4238 &lt;div class=&quot;mdl-tabs__panel is-active&quot; id=&quot;tab1&quot;&gt;
4239 &lt;p&gt;First tab&#39;s content.&lt;/p&gt;
4240 &lt;/div&gt;
4241 &lt;div class=&quot;mdl-tabs__panel&quot; id=&quot;tab2&quot;&gt;
4242 &lt;p&gt;Second tab&#39;s content.&lt;/p&gt;
4243 &lt;/div&gt;
4244 &lt;div class=&quot;mdl-tabs__panel&quot; id=&quot;tab3&quot;&gt;
4245 &lt;p&gt;Third tab&#39;s content.&lt;/p&gt;
4246 &lt;/div&gt;
4247&lt;/div&gt;
4248</code></pre>
4249<p>The tab components are ready for use.</p>
4250<h4 id="example">Example</h4>
4251<p>Three tabs, with ripple effect on tab links.</p>
4252<pre><code class="language-markup">&lt;div class=&quot;mdl-tabs mdl-js-tabs mdl-js-ripple-effect&quot;&gt;
4253 &lt;div class=&quot;mdl-tabs__tab-bar&quot;&gt;
4254 &lt;a href=&quot;#about-panel&quot; class=&quot;mdl-tabs__tab is-active&quot;&gt;About the Beatles&lt;/a&gt;
4255 &lt;a href=&quot;#members-panel&quot; class=&quot;mdl-tabs__tab&quot;&gt;Members&lt;/a&gt;
4256 &lt;a href=&quot;#albums-panel&quot; class=&quot;mdl-tabs__tab&quot;&gt;Discography&lt;/a&gt;
4257 &lt;/div&gt;
4258 &lt;div class=&quot;mdl-tabs__panel is-active&quot; id=&quot;about-panel&quot;&gt;
4259 &lt;p&gt;&lt;b&gt;The Beatles&lt;/b&gt; were a four-piece musical group from Liverpool, England.
4260 Formed in 1960, their career spanned just over a decade, yet they are widely
4261 regarded as the most influential band in history.&lt;/p&gt;
4262 &lt;p&gt;Their songs are among the best-loved music of all time. It is said that every
4263 minute of every day, a radio station somewhere is playing a Beatles song.&lt;/p&gt;
4264 &lt;/div&gt;
4265 &lt;div class=&quot;mdl-tabs__panel&quot; id=&quot;members-panel&quot;&gt;
4266 &lt;p&gt;The Beatles&#39; members were:&lt;/p&gt;
4267 &lt;ul&gt;
4268 &lt;li&gt;John Lennon (1940-1980)&lt;/li&gt;
4269 &lt;li&gt;Paul McCartney (1942-)&lt;/li&gt;
4270 &lt;li&gt;George Harrison (1943-2001)&lt;/li&gt;
4271 &lt;li&gt;Ringo Starr (1940-)&lt;/li&gt;
4272 &lt;/ul&gt;
4273 &lt;/div&gt;
4274 &lt;div class=&quot;mdl-tabs__panel&quot; id=&quot;albums-panel&quot;&gt;
4275 &lt;p&gt;The Beatles&#39; original UK LPs, in order of release:&lt;/p&gt;
4276 &lt;ol&gt;
4277 &lt;li&gt;Please Please Me (1963)&lt;/li&gt;
4278 &lt;li&gt;With the Beatles (1963)&lt;/li&gt;
4279 &lt;li&gt;A Hard Day&#39;s Night (1964)&lt;/li&gt;
4280 &lt;li&gt;Beatles for Sale (1964)&lt;/li&gt;
4281 &lt;li&gt;Help! (1965)&lt;/li&gt;
4282 &lt;li&gt;Rubber Soul (1965)&lt;/li&gt;
4283 &lt;li&gt;Revolver (1966)&lt;/li&gt;
4284 &lt;li&gt;Sgt. Pepper&#39;s Lonely Hearts Club Band (1967)&lt;/li&gt;
4285 &lt;li&gt;The Beatles (&quot;The White Album&quot;, 1968)&lt;/li&gt;
4286 &lt;li&gt;Yellow Submarine (1969)&lt;/li&gt;
4287 &lt;li&gt;Abbey Road (1969)&lt;/li&gt;
4288 &lt;li&gt;Let It Be (1970)&lt;/li&gt;
4289 &lt;/ol&gt;
4290 &lt;/div&gt;
4291&lt;/div&gt;
4292</code></pre>
4293<h2 id="configuration-options">Configuration options</h2>
4294<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the tabs. The table below lists the available classes and their effects.</p>
4295<table>
4296<thead>
4297<tr>
4298<th>MDL class</th>
4299<th>Effect</th>
4300<th>Remarks</th>
4301</tr>
4302</thead>
4303<tbody>
4304<tr>
4305<td><code>mdl-tabs</code></td>
4306<td>Defines a tabs container as an MDL component</td>
4307<td>Required on &quot;outer&quot; div element</td>
4308</tr>
4309<tr>
4310<td><code>mdl-js-tabs</code></td>
4311<td>Assigns basic MDL behavior to tabs container</td>
4312<td>Required on &quot;outer&quot; div element</td>
4313</tr>
4314<tr>
4315<td><code>mdl-js-ripple-effect</code></td>
4316<td>Applies <em>ripple</em> click effect to tab links</td>
4317<td>Optional; goes on &quot;outer&quot; div element</td>
4318</tr>
4319<tr>
4320<td><code>mdl-tabs__tab-bar</code></td>
4321<td>Defines a container as an MDL tabs link bar</td>
4322<td>Required on first &quot;inner&quot; div element</td>
4323</tr>
4324<tr>
4325<td><code>mdl-tabs__tab</code></td>
4326<td>Defines an anchor (link) as an MDL tab activator</td>
4327<td>Required on all links in first &quot;inner&quot; div element</td>
4328</tr>
4329<tr>
4330<td><code>is-active</code></td>
4331<td>Defines a tab as the default display tab</td>
4332<td>Required on one (and only one) of the &quot;inner&quot; div (tab) elements</td>
4333</tr>
4334<tr>
4335<td><code>mdl-tabs__panel</code></td>
4336<td>Defines a container as tab content</td>
4337<td>Required on each of the &quot;inner&quot; div (tab) elements</td>
4338</tr>
4339</tbody>
4340</table>
4341
4342
4343
4344 </div>
4345
4346
4347
4348 <span class="docs-text-styling">
4349 <h1 class="mdl-components__classname" id="layout-section/footer">Footer</h1>
4350 </span>
4351
4352 <!-- Add warning, if the component has one -->
4353
4354 <!-- Generating snippets -->
4355
4356
4357
4358<div class="snippet-group is-full-width">
4359
4360 <div class="snippet-header">
4361 <div class="snippet-demos">
4362 <div class="snippet-demo-padding"></div>
4363
4364
4365
4366
4367 <div class="snippet-demo">
4368 <div class="snippet-demo-container demo-footer demo-footer__mega-footer">
4369 <footer class="mdl-mega-footer">
4370 <div class="mdl-mega-footer__middle-section">
4371
4372 <div class="mdl-mega-footer__drop-down-section">
4373 <input class="mdl-mega-footer__heading-checkbox" type="checkbox" checked>
4374 <h1 class="mdl-mega-footer__heading">Features</h1>
4375 <ul class="mdl-mega-footer__link-list">
4376 <li><a href="#">About</a></li>
4377 <li><a href="#">Terms</a></li>
4378 <li><a href="#">Partners</a></li>
4379 <li><a href="#">Updates</a></li>
4380 </ul>
4381 </div>
4382
4383 <div class="mdl-mega-footer__drop-down-section">
4384 <input class="mdl-mega-footer__heading-checkbox" type="checkbox" checked>
4385 <h1 class="mdl-mega-footer__heading">Details</h1>
4386 <ul class="mdl-mega-footer__link-list">
4387 <li><a href="#">Specs</a></li>
4388 <li><a href="#">Tools</a></li>
4389 <li><a href="#">Resources</a></li>
4390 </ul>
4391 </div>
4392
4393 <div class="mdl-mega-footer__drop-down-section">
4394 <input class="mdl-mega-footer__heading-checkbox" type="checkbox" checked>
4395 <h1 class="mdl-mega-footer__heading">Technology</h1>
4396 <ul class="mdl-mega-footer__link-list">
4397 <li><a href="#">How it works</a></li>
4398 <li><a href="#">Patterns</a></li>
4399 <li><a href="#">Usage</a></li>
4400 <li><a href="#">Products</a></li>
4401 <li><a href="#">Contracts</a></li>
4402 </ul>
4403 </div>
4404
4405 <div class="mdl-mega-footer__drop-down-section">
4406 <input class="mdl-mega-footer__heading-checkbox" type="checkbox" checked>
4407 <h1 class="mdl-mega-footer__heading">FAQ</h1>
4408 <ul class="mdl-mega-footer__link-list">
4409 <li><a href="#">Questions</a></li>
4410 <li><a href="#">Answers</a></li>
4411 <li><a href="#">Contact us</a></li>
4412 </ul>
4413 </div>
4414
4415 </div>
4416
4417 <div class="mdl-mega-footer__bottom-section">
4418 <div class="mdl-logo">Title</div>
4419 <ul class="mdl-mega-footer__link-list">
4420 <li><a href="#">Help</a></li>
4421 <li><a href="#">Privacy &amp; Terms</a></li>
4422 </ul>
4423 </div>
4424
4425</footer>
4426
4427 </div>
4428 </div>
4429 <div class="snippet-demo-padding"></div>
4430 </div>
4431 <div class="snippet-captions">
4432 <div class="snippet-caption-padding"></div>
4433
4434 <div class="snippet-caption">
4435 Mega footer
4436 </div>
4437 <div class="snippet-caption-padding"></div>
4438 </div>
4439 </div>
4440 <div class="snippet-code">
4441 <pre class="language-markup codepen-button-enabled"><code id="footer/mega-footer.html">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4442 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4443
4444 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4445 &lt;input class=&quot;mdl-mega-footer__heading-checkbox&quot; type=&quot;checkbox&quot; checked&gt;
4446 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;Features&lt;/h1&gt;
4447 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4448 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
4449 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Terms&lt;/a&gt;&lt;/li&gt;
4450 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Partners&lt;/a&gt;&lt;/li&gt;
4451 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Updates&lt;/a&gt;&lt;/li&gt;
4452 &lt;/ul&gt;
4453 &lt;/div&gt;
4454
4455 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4456 &lt;input class=&quot;mdl-mega-footer__heading-checkbox&quot; type=&quot;checkbox&quot; checked&gt;
4457 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;Details&lt;/h1&gt;
4458 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4459 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Specs&lt;/a&gt;&lt;/li&gt;
4460 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Tools&lt;/a&gt;&lt;/li&gt;
4461 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Resources&lt;/a&gt;&lt;/li&gt;
4462 &lt;/ul&gt;
4463 &lt;/div&gt;
4464
4465 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4466 &lt;input class=&quot;mdl-mega-footer__heading-checkbox&quot; type=&quot;checkbox&quot; checked&gt;
4467 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;Technology&lt;/h1&gt;
4468 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4469 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;How it works&lt;/a&gt;&lt;/li&gt;
4470 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Patterns&lt;/a&gt;&lt;/li&gt;
4471 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Usage&lt;/a&gt;&lt;/li&gt;
4472 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Products&lt;/a&gt;&lt;/li&gt;
4473 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contracts&lt;/a&gt;&lt;/li&gt;
4474 &lt;/ul&gt;
4475 &lt;/div&gt;
4476
4477 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4478 &lt;input class=&quot;mdl-mega-footer__heading-checkbox&quot; type=&quot;checkbox&quot; checked&gt;
4479 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;FAQ&lt;/h1&gt;
4480 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4481 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Questions&lt;/a&gt;&lt;/li&gt;
4482 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Answers&lt;/a&gt;&lt;/li&gt;
4483 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact us&lt;/a&gt;&lt;/li&gt;
4484 &lt;/ul&gt;
4485 &lt;/div&gt;
4486
4487 &lt;/div&gt;
4488
4489 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4490 &lt;div class=&quot;mdl-logo&quot;&gt;Title&lt;/div&gt;
4491 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4492 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Help&lt;/a&gt;&lt;/li&gt;
4493 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Privacy &amp; Terms&lt;/a&gt;&lt;/li&gt;
4494 &lt;/ul&gt;
4495 &lt;/div&gt;
4496
4497&lt;/footer&gt;
4498</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
4499 </div>
4500</div>
4501
4502
4503
4504
4505<div class="snippet-group is-full-width">
4506
4507 <div class="snippet-header">
4508 <div class="snippet-demos">
4509 <div class="snippet-demo-padding"></div>
4510
4511
4512
4513
4514 <div class="snippet-demo">
4515 <div class="snippet-demo-container demo-footer demo-footer__mini-footer">
4516 <footer class="mdl-mini-footer">
4517 <div class="mdl-mini-footer__left-section">
4518 <div class="mdl-logo">Title</div>
4519 <ul class="mdl-mini-footer__link-list">
4520 <li><a href="#">Help</a></li>
4521 <li><a href="#">Privacy &amp; Terms</a></li>
4522 </ul>
4523 </div>
4524</footer>
4525
4526 </div>
4527 </div>
4528 <div class="snippet-demo-padding"></div>
4529 </div>
4530 <div class="snippet-captions">
4531 <div class="snippet-caption-padding"></div>
4532
4533 <div class="snippet-caption">
4534 Mini footer
4535 </div>
4536 <div class="snippet-caption-padding"></div>
4537 </div>
4538 </div>
4539 <div class="snippet-code">
4540 <pre class="language-markup codepen-button-enabled"><code id="footer/mini-footer.html">&lt;footer class=&quot;mdl-mini-footer&quot;&gt;
4541 &lt;div class=&quot;mdl-mini-footer__left-section&quot;&gt;
4542 &lt;div class=&quot;mdl-logo&quot;&gt;Title&lt;/div&gt;
4543 &lt;ul class=&quot;mdl-mini-footer__link-list&quot;&gt;
4544 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Help&lt;/a&gt;&lt;/li&gt;
4545 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Privacy &amp; Terms&lt;/a&gt;&lt;/li&gt;
4546 &lt;/ul&gt;
4547 &lt;/div&gt;
4548&lt;/footer&gt;
4549</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
4550 </div>
4551</div>
4552
4553
4554 <!-- Adding the demo page -->
4555
4556 <style>
4557
4558 </style>
4559
4560 <script>
4561
4562 </script>
4563
4564
4565 <div class="docs-text-styling docs-readme">
4566
4567
4568
4569
4570<h2 id="introduction">Introduction</h2>
4571<p>The Material Design Lite (MDL) <strong>footer</strong> component is a comprehensive container intended to present a substantial amount of related content in a visually attractive and logically intuitive area. Although it is called &quot;footer&quot;, it may be placed at any appropriate location on a device screen, either before or after other content.</p>
4572<p>An MDL footer component takes two basic forms: <em>mega-footer</em> and <em>mini-footer</em>. As the names imply, mega-footers contain more (and more complex) content than mini-footers. A mega-footer presents multiple sections of content separated by horizontal rules, while a mini-footer presents a single section of content. Both footer forms have their own internal structures, including required and optional elements, and typically include both informational and clickable content, such as links.</p>
4573<p>Footers, as represented by this component, are a fairly new feature in user interfaces, and allow users to view discrete blocks of content in a coherent and consistently organized way. Their design and use is an important factor in the overall user experience.</p>
4574<h3 id="to-include-an-mdl-mega-footer-component-">To include an MDL <strong>mega-footer</strong> component:</h3>
4575<p>&nbsp;1a. Code a <code>&lt;footer&gt;</code> element. Inside the footer, include one <code>&lt;div&gt;</code> element for each content section, typically three: <em>top</em>, <em>middle</em>, and <em>bottom</em>.</p>
4576<pre><code class="language-markup">&lt;footer&gt;
4577 &lt;div&gt;
4578 ...
4579 &lt;/div&gt;
4580 &lt;div&gt;
4581 ...
4582 &lt;/div&gt;
4583 &lt;div&gt;
4584 ...
4585 &lt;/div&gt;
4586&lt;/footer&gt;
4587</code></pre>
4588<p>&nbsp;1b. Add the appropriate MDL classes to the footer and divs using the <code>class</code> attribute.</p>
4589<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4590 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4591 ...
4592 &lt;/div&gt;
4593 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4594 ...
4595 &lt;/div&gt;
4596 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4597 ...
4598 &lt;/div&gt;
4599&lt;/footer&gt;
4600</code></pre>
4601<p>&nbsp;2a. Inside the top section div, code two sibling &quot;inner&quot; divs for the <em>left</em> and <em>right</em> content sections.</p>
4602<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4603 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4604 &lt;div&gt;
4605 ...
4606 &lt;/div&gt;
4607 &lt;div&gt;
4608 ...
4609 &lt;/div&gt;
4610 &lt;/div&gt;
4611 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4612 ...
4613 &lt;/div&gt;
4614 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4615 ...
4616 &lt;/div&gt;
4617&lt;/footer&gt;
4618</code></pre>
4619<p>&nbsp;2b. Add the appropriate MDL classes to the two &quot;inner&quot; left and right divs using the <code>class</code> attribute.</p>
4620<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4621 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4622 &lt;div class=&quot;mdl-mega-footer__left-section&quot;&gt;
4623 ...
4624 &lt;/div&gt;
4625 &lt;div class=&quot;mdl-mega-footer__right-section&quot;&gt;
4626 ...
4627 &lt;/div&gt;
4628 &lt;/div&gt;
4629 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4630 ...
4631 &lt;/div&gt;
4632 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4633 ...
4634 &lt;/div&gt;
4635&lt;/footer&gt;
4636</code></pre>
4637<p>&nbsp;3a. Inside the middle section div, code one or more sibling &quot;inner&quot; divs for the <em>drop-down</em> content sections. That is, for two drop-down sections, you would code two divs.</p>
4638<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4639 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4640 &lt;div class=&quot;mdl-mega-footer__left-section&quot;&gt;
4641 ...
4642 &lt;/div&gt;
4643 &lt;div class=&quot;mdl-mega-footer__right-section&quot;&gt;
4644 ...
4645 &lt;/div&gt;
4646 &lt;/div&gt;
4647 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4648 &lt;div&gt;
4649 ...
4650 &lt;/div&gt;
4651 &lt;div&gt;
4652 ...
4653 &lt;/div&gt;
4654 &lt;/div&gt;
4655 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4656 ...
4657 &lt;/div&gt;
4658&lt;/footer&gt;
4659</code></pre>
4660<p>&nbsp;3b. Add the appropriate MDL classes to the two &quot;inner&quot; drop-down divs using the <code>class</code> attribute.</p>
4661<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4662 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4663 &lt;div class=&quot;mdl-mega-footer__left-section&quot;&gt;
4664 ...
4665 &lt;/div&gt;
4666 &lt;div class=&quot;mdl-mega-footer__right-section&quot;&gt;
4667 ...
4668 &lt;/div&gt;
4669 &lt;/div&gt;
4670 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4671 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4672 ...
4673 &lt;/div&gt;
4674 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4675 ...
4676 &lt;/div&gt;
4677 &lt;/div&gt;
4678 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4679 ...
4680 &lt;/div&gt;
4681&lt;/footer&gt;
4682</code></pre>
4683<p>&nbsp;4a. Inside the bottom section div, code an &quot;inner&quot; div for the section heading and a sibling unordered list for the bottom section links.</p>
4684<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4685 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4686 &lt;div class=&quot;mdl-mega-footer__left-section&quot;&gt;
4687 ...
4688 &lt;/div&gt;
4689 &lt;div class=&quot;mdl-mega-footer__right-section&quot;&gt;
4690 ...
4691 &lt;/div&gt;
4692 &lt;/div&gt;
4693 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4694 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4695 ...
4696 &lt;/div&gt;
4697 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4698 ...
4699 &lt;/div&gt;
4700 &lt;/div&gt;
4701 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4702 &lt;div&gt;
4703 ...
4704 &lt;/div&gt;
4705 &lt;ul&gt;
4706 ...
4707 &lt;/ul&gt;
4708 &lt;/div&gt;
4709&lt;/footer&gt;
4710</code></pre>
4711<p>&nbsp;4b. Add the appropriate MDL classes to the &quot;inner&quot; div heading and list using the <code>class</code> attribute.</p>
4712<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4713 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4714 &lt;div class=&quot;mdl-mega-footer__left-section&quot;&gt;
4715 ...
4716 &lt;/div&gt;
4717 &lt;div class=&quot;mdl-mega-footer__right-section&quot;&gt;
4718 ...
4719 &lt;/div&gt;
4720 &lt;/div&gt;
4721 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4722 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4723 ...
4724 &lt;/div&gt;
4725 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4726 ...
4727 &lt;/div&gt;
4728 &lt;/div&gt;
4729 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4730 &lt;div class=&quot;mdl-logo&quot;&gt;
4731 &lt;/div&gt;
4732 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4733 ...
4734 &lt;/ul&gt;
4735 &lt;/div&gt;
4736&lt;/footer&gt;
4737</code></pre>
4738<p>&nbsp;5. Add content to the top (left and right), middle (drop-downs), and bottom (text and links) sections of the footer; include any appropriate MDL classes using the <code>class</code> attribute.</p>
4739<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4740 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4741 &lt;div class=&quot;mdl-mega-footer__left-section&quot;&gt;
4742 &lt;button class=&quot;mdl-mega-footer__social-btn&quot;&gt;&lt;/button&gt;
4743 &lt;button class=&quot;mdl-mega-footer__social-btn&quot;&gt;&lt;/button&gt;
4744 &lt;button class=&quot;mdl-mega-footer__social-btn&quot;&gt;&lt;/button&gt;
4745 &lt;/div&gt;
4746 &lt;div class=&quot;mdl-mega-footer__right-section&quot;&gt;
4747 &lt;a href=&quot;&quot;&gt;Link 1&lt;/a&gt;
4748 &lt;a href=&quot;&quot;&gt;Link 2&lt;/a&gt;
4749 &lt;a href=&quot;&quot;&gt;Link 3&lt;/a&gt;
4750 &lt;/div&gt;
4751 &lt;/div&gt;
4752 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4753 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4754 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;Drop-down 1 Heading&lt;/h1&gt;
4755 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4756 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link A&lt;/a&gt;&lt;/li&gt;
4757 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link B&lt;/a&gt;&lt;/li&gt;
4758 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link C&lt;/a&gt;&lt;/li&gt;
4759 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link D&lt;/a&gt;&lt;/li&gt;
4760 &lt;/ul&gt;
4761 &lt;/div&gt;
4762 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4763 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;Drop-down 2 Heading&lt;/h1&gt;
4764 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4765 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link A&lt;/a&gt;&lt;/li&gt;
4766 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link B&lt;/a&gt;&lt;/li&gt;
4767 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link C&lt;/a&gt;&lt;/li&gt;
4768 &lt;/ul&gt;
4769 &lt;/div&gt;
4770 &lt;/div&gt;
4771 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4772 &lt;div class=&quot;mdl-logo&quot;&gt;
4773 Mega-Footer Bottom Section Heading
4774 &lt;/div&gt;
4775 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4776 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link A&lt;/a&gt;&lt;/li&gt;
4777 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link B&lt;/a&gt;&lt;/li&gt;
4778 &lt;/ul&gt;
4779 &lt;/div&gt;
4780&lt;/footer&gt;
4781</code></pre>
4782<p>The mega-footer component is ready for use.</p>
4783<h4 id="examples">Examples</h4>
4784<p>A mega-footer component with three sections and two drop-down sections in the middle section.</p>
4785<pre><code class="language-markup">&lt;footer class=&quot;mdl-mega-footer&quot;&gt;
4786 &lt;div class=&quot;mdl-mega-footer__top-section&quot;&gt;
4787 &lt;div class=&quot;mdl-mega-footer__left-section&quot;&gt;
4788 &lt;button class=&quot;mdl-mega-footer__social-btn&quot;&gt;&lt;/button&gt;
4789 &lt;button class=&quot;mdl-mega-footer__social-btn&quot;&gt;&lt;/button&gt;
4790 &lt;button class=&quot;mdl-mega-footer__social-btn&quot;&gt;&lt;/button&gt;
4791 &lt;/div&gt;
4792 &lt;div class=&quot;mdl-mega-footer__right-section&quot;&gt;
4793 &lt;a href=&quot;#&quot;&gt;Introduction&lt;/a&gt;
4794 &lt;a href=&quot;#&quot;&gt;App Status Dashboard&lt;/a&gt;
4795 &lt;a href=&quot;#&quot;&gt;Terms of Service&lt;/a&gt;
4796 &lt;/div&gt;
4797 &lt;/div&gt;
4798 &lt;div class=&quot;mdl-mega-footer__middle-section&quot;&gt;
4799 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4800 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;Learning and Support&lt;/h1&gt;
4801 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4802 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Resource Center&lt;/a&gt;&lt;/li&gt;
4803 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Help Center&lt;/a&gt;&lt;/li&gt;
4804 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Community&lt;/a&gt;&lt;/li&gt;
4805 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Learn with Google&lt;/a&gt;&lt;/li&gt;
4806 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Small Business Community&lt;/a&gt;&lt;/li&gt;
4807 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Think Insights&lt;/a&gt;&lt;/li&gt;
4808 &lt;/ul&gt;
4809 &lt;/div&gt;
4810 &lt;div class=&quot;mdl-mega-footer__drop-down-section&quot;&gt;
4811 &lt;h1 class=&quot;mdl-mega-footer__heading&quot;&gt;Just for Developers&lt;/h1&gt;
4812 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4813 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Google Developers&lt;/a&gt;&lt;/li&gt;
4814 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AdWords API&lt;/a&gt;&lt;/li&gt;
4815 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AdWords Scipts&lt;/a&gt;&lt;/li&gt;
4816 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AdWords Remarketing Tag&lt;/a&gt;&lt;/li&gt;
4817 &lt;/ul&gt;
4818 &lt;/div&gt;
4819 &lt;/div&gt;
4820 &lt;div class=&quot;mdl-mega-footer__bottom-section&quot;&gt;
4821 &lt;div class=&quot;mdl-logo&quot;&gt;
4822 More Information
4823 &lt;/div&gt;
4824 &lt;ul class=&quot;mdl-mega-footer__link-list&quot;&gt;
4825 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Help&lt;/a&gt;&lt;/li&gt;
4826 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Privacy and Terms&lt;/a&gt;&lt;/li&gt;
4827 &lt;/ul&gt;
4828 &lt;/div&gt;
4829&lt;/footer&gt;
4830</code></pre>
4831<h3 id="to-include-an-mdl-mini-footer-component-">To include an MDL <strong>mini-footer</strong> component:</h3>
4832<p>&nbsp;1a. Code a <code>&lt;footer&gt;</code> element. Inside the footer, code two <code>&lt;div&gt;</code> elements, one for the <em>left</em> section and one for the <em>right</em> section.</p>
4833<pre><code class="language-markup">&lt;footer&gt;
4834 &lt;div&gt;
4835 ...
4836 &lt;/div&gt;
4837 &lt;div&gt;
4838 ...
4839 &lt;/div&gt;
4840&lt;/footer&gt;
4841</code></pre>
4842<p>&nbsp;1b. Add the appropriate MDL classes to the footer and divs using the <code>class</code> attribute.</p>
4843<pre><code class="language-markup">&lt;footer class=&quot;mdl-mini-footer&quot;&gt;
4844 &lt;div class=&quot;mdl-mini-footer__left-section&quot;&gt;
4845 ...
4846 &lt;/div&gt;
4847 &lt;div class=&quot;mdl-mini-footer__right-section&quot;&gt;
4848 ...
4849 &lt;/div&gt;
4850&lt;/footer&gt;
4851</code></pre>
4852<p>&nbsp;2a. Inside the left section div, code an &quot;inner&quot; div for the section heading and a sibling unordered list for the left section links.</p>
4853<pre><code class="language-markup">&lt;footer class=&quot;mdl-mini-footer&quot;&gt;
4854 &lt;div class=&quot;mdl-mini-footer__left-section&quot;&gt;
4855 &lt;div&gt;
4856 ...
4857 &lt;/div&gt;
4858 &lt;ul&gt;
4859 ...
4860 &lt;/ul&gt;
4861 &lt;/div&gt;
4862 &lt;div class=&quot;mdl-mini-footer__right-section&quot;&gt;
4863 ...
4864 &lt;/div&gt;
4865&lt;/footer&gt;
4866</code></pre>
4867<p>&nbsp;2b. Add the appropriate MDL classes to the &quot;inner&quot; div and list using the <code>class</code> attribute.</p>
4868<pre><code class="language-markup">&lt;footer class=&quot;mdl-mini-footer&quot;&gt;
4869 &lt;div class=&quot;mdl-mini-footer__left-section&quot;&gt;
4870 &lt;div class=&quot;mdl-logo&quot;&gt;
4871 ...
4872 &lt;/div&gt;
4873 &lt;ul class=&quot;mdl-mini-footer__link-list&quot;&gt;
4874 ...
4875 &lt;/ul&gt;
4876 &lt;/div&gt;
4877 &lt;div class=&quot;mdl-mini-footer__right-section&quot;&gt;
4878 ...
4879 &lt;/div&gt;
4880&lt;/footer&gt;
4881</code></pre>
4882<p>&nbsp;3. Add content to the left (text and links) and right (text or decoration) sections of the footer; include any appropriate MDL classes using the <code>class</code> attribute.</p>
4883<pre><code class="language-markup">&lt;footer class=&quot;mdl-mini-footer&quot;&gt;
4884 &lt;div class=&quot;mdl-mini-footer__left-section&quot;&gt;
4885 &lt;div class=&quot;mdl-logo&quot;&gt;
4886 Mini-footer Heading
4887 &lt;/div&gt;
4888 &lt;ul class=&quot;mdl-mini-footer__link-list&quot;&gt;
4889 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 1&lt;/a&gt;&lt;/li&gt;
4890 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 2&lt;/a&gt;&lt;/li&gt;
4891 &lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 3&lt;/a&gt;&lt;/li&gt;
4892 &lt;/ul&gt;
4893 &lt;/div&gt;
4894 &lt;div class=&quot;mdl-mini-footer__right-section&quot;&gt;
4895 &lt;button class=&quot;mdl-mini-footer__social-btn&quot;&gt;&lt;/button&gt;
4896 &lt;button class=&quot;mdl-mini-footer__social-btn&quot;&gt;&lt;/button&gt;
4897 &lt;button class=&quot;mdl-mini-footer__social-btn&quot;&gt;&lt;/button&gt;
4898 &lt;/div&gt;
4899&lt;/footer&gt;
4900</code></pre>
4901<p>The mini-footer component is ready for use.</p>
4902<h4 id="examples">Examples</h4>
4903<p>A mini-footer with left and right sections.</p>
4904<pre><code class="language-markup">&lt;footer class=&quot;mdl-mini-footer&quot;&gt;
4905 &lt;div class=&quot;mdl-mini-footer__left-section&quot;&gt;
4906 &lt;div class=&quot;mdl-logo&quot;&gt;
4907 More Information
4908 &lt;/div&gt;
4909 &lt;ul class=&quot;mdl-mini-footer__link-list&quot;&gt;
4910 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Help&lt;/a&gt;&lt;/li&gt;
4911 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Privacy and Terms&lt;/a&gt;&lt;/li&gt;
4912 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;User Agreement&lt;/a&gt;&lt;/li&gt;
4913 &lt;/ul&gt;
4914 &lt;/div&gt;
4915 &lt;div class=&quot;mdl-mini-footer__right-section&quot;&gt;
4916 &lt;button class=&quot;mdl-mini-footer__social-btn&quot;&gt;&lt;/button&gt;
4917 &lt;button class=&quot;mdl-mini-footer__social-btn&quot;&gt;&lt;/button&gt;
4918 &lt;button class=&quot;mdl-mini-footer__social-btn&quot;&gt;&lt;/button&gt;
4919 &lt;/div&gt;
4920&lt;/footer&gt;
4921</code></pre>
4922<h2 id="configuration-options">Configuration options</h2>
4923<p>The MDL CSS classes apply various predefined visual enhancements to the footer. The table below lists the available classes and their effects.</p>
4924<table>
4925<thead>
4926<tr>
4927<th>MDL class</th>
4928<th>Effect</th>
4929<th>Remarks</th>
4930</tr>
4931</thead>
4932<tbody>
4933<tr>
4934<td><code>mdl-mega-footer</code></td>
4935<td>Defines container as an MDL mega-footer component</td>
4936<td>Required on footer element</td>
4937</tr>
4938<tr>
4939<td><code>mdl-mega-footer__top-section</code></td>
4940<td>Defines container as a footer top section</td>
4941<td>Required on top section &quot;outer&quot; div element</td>
4942</tr>
4943<tr>
4944<td><code>mdl-mega-footer__left-section</code></td>
4945<td>Defines container as a left section</td>
4946<td>Required on left section &quot;inner&quot; div element</td>
4947</tr>
4948<tr>
4949<td><code>mdl-mega-footer__social-btn</code></td>
4950<td>Defines a decorative square within mega-footer</td>
4951<td>Required on button element (if used)</td>
4952</tr>
4953<tr>
4954<td><code>mdl-mega-footer__right-section</code></td>
4955<td>Defines container as a right section</td>
4956<td>Required on right section &quot;inner&quot; div element</td>
4957</tr>
4958<tr>
4959<td><code>mdl-mega-footer__middle-section</code></td>
4960<td>Defines container as a footer middle section</td>
4961<td>Required on middle section &quot;outer&quot; div element</td>
4962</tr>
4963<tr>
4964<td><code>mdl-mega-footer__drop-down-section</code></td>
4965<td>Defines container as a drop-down (vertical) content area</td>
4966<td>Required on drop-down &quot;inner&quot; div elements</td>
4967</tr>
4968<tr>
4969<td><code>mdl-mega-footer__heading</code></td>
4970<td>Defines a heading as a mega-footer heading</td>
4971<td>Required on h1 element inside drop-down section</td>
4972</tr>
4973<tr>
4974<td><code>mdl-mega-footer__link-list</code></td>
4975<td>Defines an unordered list as a drop-down (vertical) list</td>
4976<td>Required on ul element inside drop-down section</td>
4977</tr>
4978<tr>
4979<td><code>mdl-mega-footer__bottom-section</code></td>
4980<td>Defines container as a footer bottom section</td>
4981<td>Required on bottom section &quot;outer&quot; div element</td>
4982</tr>
4983<tr>
4984<td><code>mdl-logo</code></td>
4985<td>Defines a container as a styled section heading</td>
4986<td>Required on &quot;inner&quot; div element in mega-footer bottom-section or mini-footer left-section</td>
4987</tr>
4988<tr>
4989<td><code>mdl-mini-footer</code></td>
4990<td>Defines container as an MDL mini-footer component</td>
4991<td>Required on footer element</td>
4992</tr>
4993<tr>
4994<td><code>mdl-mini-footer__left-section</code></td>
4995<td>Defines container as a left section</td>
4996<td>Required on left section &quot;inner&quot; div element</td>
4997</tr>
4998<tr>
4999<td><code>mdl-mini-footer__link-list</code></td>
5000<td>Defines an unordered list as an inline (horizontal) list</td>
5001<td>Required on ul element sibling to &quot;mdl-logo&quot; div element</td>
5002</tr>
5003<tr>
5004<td><code>mdl-mini-footer__right-section</code></td>
5005<td>Defines container as a right section</td>
5006<td>Required on right section &quot;inner&quot; div element</td>
5007</tr>
5008<tr>
5009<td><code>mdl-mini-footer__social-btn</code></td>
5010<td>Defines a decorative square within mini-footer</td>
5011<td>Required on button element (if used)</td>
5012</tr>
5013</tbody>
5014</table>
5015
5016
5017
5018 </div>
5019
5020 </div>
5021 </section>
5022 <section id="lists-section" class="mdl-components__page mdl-grid">
5023 <div class="mdl-cell mdl-cell--12-col">
5024 <div class="docs-text-styling component-title">
5025 <h3>Lists</h3>
5026 <p>Customizable scrollable lists.</p>
5027 </div>
5028
5029
5030
5031
5032
5033
5034 <!-- Add warning, if the component has one -->
5035
5036 <!-- Generating snippets -->
5037
5038
5039
5040<div class="snippet-group">
5041
5042 <div class="snippet-header">
5043 <div class="snippet-demos">
5044 <div class="snippet-demo-padding"></div>
5045
5046
5047
5048
5049 <div class="snippet-demo">
5050 <div class="snippet-demo-container demo-list demo-list__list-item">
5051 <!-- Simple list -->
5052<style>
5053.demo-list-item {
5054 width: 300px;
5055}
5056</style>
5057
5058<ul class="demo-list-item mdl-list">
5059 <li class="mdl-list__item">
5060 <span class="mdl-list__item-primary-content">
5061 Bryan Cranston
5062 </span>
5063 </li>
5064 <li class="mdl-list__item">
5065 <span class="mdl-list__item-primary-content">
5066 Aaron Paul
5067 </span>
5068 </li>
5069 <li class="mdl-list__item">
5070 <span class="mdl-list__item-primary-content">
5071 Bob Odenkirk
5072 </span>
5073 </li>
5074</ul>
5075
5076 </div>
5077 </div>
5078 <div class="snippet-demo-padding"></div>
5079 </div>
5080 <div class="snippet-captions">
5081 <div class="snippet-caption-padding"></div>
5082
5083 <div class="snippet-caption">
5084 Simple list
5085 </div>
5086 <div class="snippet-caption-padding"></div>
5087 </div>
5088 </div>
5089 <div class="snippet-code">
5090 <pre class="language-markup codepen-button-enabled"><code id="list/list-item.html">&lt;!-- Simple list --&gt;
5091&lt;style&gt;
5092.demo-list-item {
5093 width: 300px;
5094}
5095&lt;/style&gt;
5096
5097&lt;ul class=&quot;demo-list-item mdl-list&quot;&gt;
5098 &lt;li class=&quot;mdl-list__item&quot;&gt;
5099 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5100 Bryan Cranston
5101 &lt;/span&gt;
5102 &lt;/li&gt;
5103 &lt;li class=&quot;mdl-list__item&quot;&gt;
5104 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5105 Aaron Paul
5106 &lt;/span&gt;
5107 &lt;/li&gt;
5108 &lt;li class=&quot;mdl-list__item&quot;&gt;
5109 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5110 Bob Odenkirk
5111 &lt;/span&gt;
5112 &lt;/li&gt;
5113&lt;/ul&gt;
5114</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5115body {
5116 padding: 20px;
5117 background: #fafafa;
5118 position: relative;
5119}
5120&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5121 </div>
5122</div>
5123
5124
5125
5126
5127<div class="snippet-group">
5128
5129 <div class="snippet-header">
5130 <div class="snippet-demos">
5131 <div class="snippet-demo-padding"></div>
5132
5133
5134
5135
5136 <div class="snippet-demo">
5137 <div class="snippet-demo-container demo-list demo-list__icon">
5138 <!-- Icon List -->
5139<style>
5140.demo-list-icon {
5141 width: 300px;
5142}
5143</style>
5144
5145<ul class="demo-list-icon mdl-list">
5146 <li class="mdl-list__item">
5147 <span class="mdl-list__item-primary-content">
5148 <i class="material-icons mdl-list__item-icon">person</i>
5149 Bryan Cranston
5150</span>
5151 </li>
5152 <li class="mdl-list__item">
5153 <span class="mdl-list__item-primary-content">
5154 <i class="material-icons mdl-list__item-icon">person</i>
5155 Aaron Paul
5156 </span>
5157 </li>
5158 <li class="mdl-list__item">
5159 <span class="mdl-list__item-primary-content">
5160 <i class="material-icons mdl-list__item-icon">person</i>
5161 Bob Odenkirk
5162 </span>
5163 </li>
5164</ul>
5165
5166 </div>
5167 </div>
5168 <div class="snippet-demo-padding"></div>
5169 </div>
5170 <div class="snippet-captions">
5171 <div class="snippet-caption-padding"></div>
5172
5173 <div class="snippet-caption">
5174 Icons
5175 </div>
5176 <div class="snippet-caption-padding"></div>
5177 </div>
5178 </div>
5179 <div class="snippet-code">
5180 <pre class="language-markup codepen-button-enabled"><code id="list/icon.html">&lt;!-- Icon List --&gt;
5181&lt;style&gt;
5182.demo-list-icon {
5183 width: 300px;
5184}
5185&lt;/style&gt;
5186
5187&lt;ul class=&quot;demo-list-icon mdl-list&quot;&gt;
5188 &lt;li class=&quot;mdl-list__item&quot;&gt;
5189 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5190 &lt;i class=&quot;material-icons mdl-list__item-icon&quot;&gt;person&lt;/i&gt;
5191 Bryan Cranston
5192&lt;/span&gt;
5193 &lt;/li&gt;
5194 &lt;li class=&quot;mdl-list__item&quot;&gt;
5195 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5196 &lt;i class=&quot;material-icons mdl-list__item-icon&quot;&gt;person&lt;/i&gt;
5197 Aaron Paul
5198 &lt;/span&gt;
5199 &lt;/li&gt;
5200 &lt;li class=&quot;mdl-list__item&quot;&gt;
5201 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5202 &lt;i class=&quot;material-icons mdl-list__item-icon&quot;&gt;person&lt;/i&gt;
5203 Bob Odenkirk
5204 &lt;/span&gt;
5205 &lt;/li&gt;
5206&lt;/ul&gt;
5207</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5208body {
5209 padding: 20px;
5210 background: #fafafa;
5211 position: relative;
5212}
5213&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5214 </div>
5215</div>
5216
5217
5218
5219
5220<div class="snippet-group">
5221
5222 <div class="snippet-header">
5223 <div class="snippet-demos">
5224 <div class="snippet-demo-padding"></div>
5225
5226
5227
5228
5229 <div class="snippet-demo">
5230 <div class="snippet-demo-container demo-list demo-list__action">
5231 <!-- List items with avatar and action -->
5232<style>
5233.demo-list-action {
5234 width: 300px;
5235}
5236</style>
5237
5238<div class="demo-list-action mdl-list">
5239 <div class="mdl-list__item">
5240 <span class="mdl-list__item-primary-content">
5241 <i class="material-icons mdl-list__item-avatar">person</i>
5242 <span>Bryan Cranston</span>
5243 </span>
5244 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5245 </div>
5246 <div class="mdl-list__item">
5247 <span class="mdl-list__item-primary-content">
5248 <i class="material-icons mdl-list__item-avatar">person</i>
5249 <span>Aaron Paul</span>
5250 </span>
5251 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5252 </div>
5253 <div class="mdl-list__item">
5254 <span class="mdl-list__item-primary-content">
5255 <i class="material-icons mdl-list__item-avatar">person</i>
5256 <span>Bob Odenkirk</span>
5257 </span>
5258 <span class="mdl-list__item-secondary-content">
5259 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5260 </span>
5261 </div>
5262</div>
5263
5264 </div>
5265 </div>
5266 <div class="snippet-demo-padding"></div>
5267 </div>
5268 <div class="snippet-captions">
5269 <div class="snippet-caption-padding"></div>
5270
5271 <div class="snippet-caption">
5272 Avatars and actions
5273 </div>
5274 <div class="snippet-caption-padding"></div>
5275 </div>
5276 </div>
5277 <div class="snippet-code">
5278 <pre class="language-markup codepen-button-enabled"><code id="list/action.html">&lt;!-- List items with avatar and action --&gt;
5279&lt;style&gt;
5280.demo-list-action {
5281 width: 300px;
5282}
5283&lt;/style&gt;
5284
5285&lt;div class=&quot;demo-list-action mdl-list&quot;&gt;
5286 &lt;div class=&quot;mdl-list__item&quot;&gt;
5287 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5288 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5289 &lt;span&gt;Bryan Cranston&lt;/span&gt;
5290 &lt;/span&gt;
5291 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5292 &lt;/div&gt;
5293 &lt;div class=&quot;mdl-list__item&quot;&gt;
5294 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5295 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5296 &lt;span&gt;Aaron Paul&lt;/span&gt;
5297 &lt;/span&gt;
5298 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5299 &lt;/div&gt;
5300 &lt;div class=&quot;mdl-list__item&quot;&gt;
5301 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5302 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5303 &lt;span&gt;Bob Odenkirk&lt;/span&gt;
5304 &lt;/span&gt;
5305 &lt;span class=&quot;mdl-list__item-secondary-content&quot;&gt;
5306 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5307 &lt;/span&gt;
5308 &lt;/div&gt;
5309&lt;/div&gt;
5310</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5311body {
5312 padding: 20px;
5313 background: #fafafa;
5314 position: relative;
5315}
5316&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5317 </div>
5318</div>
5319
5320
5321
5322
5323<div class="snippet-group">
5324
5325 <div class="snippet-header">
5326 <div class="snippet-demos">
5327 <div class="snippet-demo-padding"></div>
5328
5329
5330
5331
5332 <div class="snippet-demo">
5333 <div class="snippet-demo-container demo-list demo-list__list-control">
5334 <!-- List with avatar and controls -->
5335<style>
5336.demo-list-control {
5337 width: 300px;
5338}
5339
5340.demo-list-radio {
5341 display: inline;
5342}
5343</style>
5344
5345<ul class="demo-list-control mdl-list">
5346 <li class="mdl-list__item">
5347 <span class="mdl-list__item-primary-content">
5348 <i class="material-icons mdl-list__item-avatar">person</i>
5349 Bryan Cranston
5350 </span>
5351 <span class="mdl-list__item-secondary-action">
5352 <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="list-checkbox-1">
5353 <input type="checkbox" id="list-checkbox-1" class="mdl-checkbox__input" checked />
5354 </label>
5355 </span>
5356 </li>
5357 <li class="mdl-list__item">
5358 <span class="mdl-list__item-primary-content">
5359 <i class="material-icons mdl-list__item-avatar">person</i>
5360 Aaron Paul
5361 </span>
5362 <span class="mdl-list__item-secondary-action">
5363 <label class="demo-list-radio mdl-radio mdl-js-radio mdl-js-ripple-effect" for="list-option-1">
5364 <input type="radio" id="list-option-1" class="mdl-radio__button" name="options" value="1" checked />
5365 </label>
5366 </span>
5367 </li>
5368 <li class="mdl-list__item">
5369 <span class="mdl-list__item-primary-content">
5370 <i class="material-icons mdl-list__item-avatar">person</i>
5371 Bob Odenkirk
5372 </span>
5373 <span class="mdl-list__item-secondary-action">
5374 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="list-switch-1">
5375 <input type="checkbox" id="list-switch-1" class="mdl-switch__input" checked />
5376 </label>
5377 </span>
5378 </li>
5379</ul>
5380
5381 </div>
5382 </div>
5383 <div class="snippet-demo-padding"></div>
5384 </div>
5385 <div class="snippet-captions">
5386 <div class="snippet-caption-padding"></div>
5387
5388 <div class="snippet-caption">
5389 Avatars and controls
5390 </div>
5391 <div class="snippet-caption-padding"></div>
5392 </div>
5393 </div>
5394 <div class="snippet-code">
5395 <pre class="language-markup codepen-button-enabled"><code id="list/list-control.html">&lt;!-- List with avatar and controls --&gt;
5396&lt;style&gt;
5397.demo-list-control {
5398 width: 300px;
5399}
5400
5401.demo-list-radio {
5402 display: inline;
5403}
5404&lt;/style&gt;
5405
5406&lt;ul class=&quot;demo-list-control mdl-list&quot;&gt;
5407 &lt;li class=&quot;mdl-list__item&quot;&gt;
5408 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5409 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5410 Bryan Cranston
5411 &lt;/span&gt;
5412 &lt;span class=&quot;mdl-list__item-secondary-action&quot;&gt;
5413 &lt;label class=&quot;mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect&quot; for=&quot;list-checkbox-1&quot;&gt;
5414 &lt;input type=&quot;checkbox&quot; id=&quot;list-checkbox-1&quot; class=&quot;mdl-checkbox__input&quot; checked /&gt;
5415 &lt;/label&gt;
5416 &lt;/span&gt;
5417 &lt;/li&gt;
5418 &lt;li class=&quot;mdl-list__item&quot;&gt;
5419 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5420 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5421 Aaron Paul
5422 &lt;/span&gt;
5423 &lt;span class=&quot;mdl-list__item-secondary-action&quot;&gt;
5424 &lt;label class=&quot;demo-list-radio mdl-radio mdl-js-radio mdl-js-ripple-effect&quot; for=&quot;list-option-1&quot;&gt;
5425 &lt;input type=&quot;radio&quot; id=&quot;list-option-1&quot; class=&quot;mdl-radio__button&quot; name=&quot;options&quot; value=&quot;1&quot; checked /&gt;
5426 &lt;/label&gt;
5427 &lt;/span&gt;
5428 &lt;/li&gt;
5429 &lt;li class=&quot;mdl-list__item&quot;&gt;
5430 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5431 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5432 Bob Odenkirk
5433 &lt;/span&gt;
5434 &lt;span class=&quot;mdl-list__item-secondary-action&quot;&gt;
5435 &lt;label class=&quot;mdl-switch mdl-js-switch mdl-js-ripple-effect&quot; for=&quot;list-switch-1&quot;&gt;
5436 &lt;input type=&quot;checkbox&quot; id=&quot;list-switch-1&quot; class=&quot;mdl-switch__input&quot; checked /&gt;
5437 &lt;/label&gt;
5438 &lt;/span&gt;
5439 &lt;/li&gt;
5440&lt;/ul&gt;
5441</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5442body {
5443 padding: 20px;
5444 background: #fafafa;
5445 position: relative;
5446}
5447&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5448 </div>
5449</div>
5450
5451
5452
5453
5454<div class="snippet-group">
5455
5456 <div class="snippet-header">
5457 <div class="snippet-demos">
5458 <div class="snippet-demo-padding"></div>
5459
5460
5461
5462
5463 <div class="snippet-demo">
5464 <div class="snippet-demo-container demo-list demo-list__two-line">
5465 <!-- Two Line List with secondary info and action -->
5466<style>
5467.demo-list-two {
5468 width: 300px;
5469}
5470</style>
5471
5472<ul class="demo-list-two mdl-list">
5473 <li class="mdl-list__item mdl-list__item--two-line">
5474 <span class="mdl-list__item-primary-content">
5475 <i class="material-icons mdl-list__item-avatar">person</i>
5476 <span>Bryan Cranston</span>
5477 <span class="mdl-list__item-sub-title">62 Episodes</span>
5478 </span>
5479 <span class="mdl-list__item-secondary-content">
5480 <span class="mdl-list__item-secondary-info">Actor</span>
5481 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5482 </span>
5483 </li>
5484 <li class="mdl-list__item mdl-list__item--two-line">
5485 <span class="mdl-list__item-primary-content">
5486 <i class="material-icons mdl-list__item-avatar">person</i>
5487 <span>Aaron Paul</span>
5488 <span class="mdl-list__item-sub-title">62 Episodes</span>
5489 </span>
5490 <span class="mdl-list__item-secondary-content">
5491 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5492 </span>
5493 </li>
5494 <li class="mdl-list__item mdl-list__item--two-line">
5495 <span class="mdl-list__item-primary-content">
5496 <i class="material-icons mdl-list__item-avatar">person</i>
5497 <span>Bob Odenkirk</span>
5498 <span class="mdl-list__item-sub-title">62 Episodes</span>
5499 </span>
5500 <span class="mdl-list__item-secondary-content">
5501 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5502 </span>
5503 </li>
5504</ul>
5505
5506 </div>
5507 </div>
5508 <div class="snippet-demo-padding"></div>
5509 </div>
5510 <div class="snippet-captions">
5511 <div class="snippet-caption-padding"></div>
5512
5513 <div class="snippet-caption">
5514 Two line
5515 </div>
5516 <div class="snippet-caption-padding"></div>
5517 </div>
5518 </div>
5519 <div class="snippet-code">
5520 <pre class="language-markup codepen-button-enabled"><code id="list/two-line.html">&lt;!-- Two Line List with secondary info and action --&gt;
5521&lt;style&gt;
5522.demo-list-two {
5523 width: 300px;
5524}
5525&lt;/style&gt;
5526
5527&lt;ul class=&quot;demo-list-two mdl-list&quot;&gt;
5528 &lt;li class=&quot;mdl-list__item mdl-list__item--two-line&quot;&gt;
5529 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5530 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5531 &lt;span&gt;Bryan Cranston&lt;/span&gt;
5532 &lt;span class=&quot;mdl-list__item-sub-title&quot;&gt;62 Episodes&lt;/span&gt;
5533 &lt;/span&gt;
5534 &lt;span class=&quot;mdl-list__item-secondary-content&quot;&gt;
5535 &lt;span class=&quot;mdl-list__item-secondary-info&quot;&gt;Actor&lt;/span&gt;
5536 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5537 &lt;/span&gt;
5538 &lt;/li&gt;
5539 &lt;li class=&quot;mdl-list__item mdl-list__item--two-line&quot;&gt;
5540 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5541 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5542 &lt;span&gt;Aaron Paul&lt;/span&gt;
5543 &lt;span class=&quot;mdl-list__item-sub-title&quot;&gt;62 Episodes&lt;/span&gt;
5544 &lt;/span&gt;
5545 &lt;span class=&quot;mdl-list__item-secondary-content&quot;&gt;
5546 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5547 &lt;/span&gt;
5548 &lt;/li&gt;
5549 &lt;li class=&quot;mdl-list__item mdl-list__item--two-line&quot;&gt;
5550 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5551 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5552 &lt;span&gt;Bob Odenkirk&lt;/span&gt;
5553 &lt;span class=&quot;mdl-list__item-sub-title&quot;&gt;62 Episodes&lt;/span&gt;
5554 &lt;/span&gt;
5555 &lt;span class=&quot;mdl-list__item-secondary-content&quot;&gt;
5556 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5557 &lt;/span&gt;
5558 &lt;/li&gt;
5559&lt;/ul&gt;
5560</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5561body {
5562 padding: 20px;
5563 background: #fafafa;
5564 position: relative;
5565}
5566&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5567 </div>
5568</div>
5569
5570
5571
5572
5573<div class="snippet-group">
5574
5575 <div class="snippet-header">
5576 <div class="snippet-demos">
5577 <div class="snippet-demo-padding"></div>
5578
5579
5580
5581
5582 <div class="snippet-demo">
5583 <div class="snippet-demo-container demo-list demo-list__three-line">
5584 <!-- Three Line List with secondary info and action -->
5585<style>
5586.demo-list-three {
5587 width: 650px;
5588}
5589</style>
5590
5591<ul class="demo-list-three mdl-list">
5592 <li class="mdl-list__item mdl-list__item--three-line">
5593 <span class="mdl-list__item-primary-content">
5594 <i class="material-icons mdl-list__item-avatar">person</i>
5595 <span>Bryan Cranston</span>
5596 <span class="mdl-list__item-text-body">
5597 Bryan Cranston played the role of Walter in Breaking Bad. He is also known
5598 for playing Hal in Malcom in the Middle.
5599 </span>
5600 </span>
5601 <span class="mdl-list__item-secondary-content">
5602 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5603 </span>
5604 </li>
5605 <li class="mdl-list__item mdl-list__item--three-line">
5606 <span class="mdl-list__item-primary-content">
5607 <i class="material-icons mdl-list__item-avatar">person</i>
5608 <span>Aaron Paul</span>
5609 <span class="mdl-list__item-text-body">
5610 Aaron Paul played the role of Jesse in Breaking Bad. He also featured in
5611 the "Need For Speed" Movie.
5612 </span>
5613 </span>
5614 <span class="mdl-list__item-secondary-content">
5615 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5616 </span>
5617 </li>
5618 <li class="mdl-list__item mdl-list__item--three-line">
5619 <span class="mdl-list__item-primary-content">
5620 <i class="material-icons mdl-list__item-avatar">person</i>
5621 <span>Bob Odenkirk</span>
5622 <span class="mdl-list__item-text-body">
5623 Bob Odinkrik played the role of Saul in Breaking Bad. Due to public fondness for the
5624 character, Bob stars in his own show now, called "Better Call Saul".
5625 </span>
5626 </span>
5627 <span class="mdl-list__item-secondary-content">
5628 <a class="mdl-list__item-secondary-action" href="#"><i class="material-icons">star</i></a>
5629 </span>
5630 </li>
5631</ul>
5632
5633 </div>
5634 </div>
5635 <div class="snippet-demo-padding"></div>
5636 </div>
5637 <div class="snippet-captions">
5638 <div class="snippet-caption-padding"></div>
5639
5640 <div class="snippet-caption">
5641 Three line
5642 </div>
5643 <div class="snippet-caption-padding"></div>
5644 </div>
5645 </div>
5646 <div class="snippet-code">
5647 <pre class="language-markup codepen-button-enabled"><code id="list/three-line.html">&lt;!-- Three Line List with secondary info and action --&gt;
5648&lt;style&gt;
5649.demo-list-three {
5650 width: 650px;
5651}
5652&lt;/style&gt;
5653
5654&lt;ul class=&quot;demo-list-three mdl-list&quot;&gt;
5655 &lt;li class=&quot;mdl-list__item mdl-list__item--three-line&quot;&gt;
5656 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5657 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5658 &lt;span&gt;Bryan Cranston&lt;/span&gt;
5659 &lt;span class=&quot;mdl-list__item-text-body&quot;&gt;
5660 Bryan Cranston played the role of Walter in Breaking Bad. He is also known
5661 for playing Hal in Malcom in the Middle.
5662 &lt;/span&gt;
5663 &lt;/span&gt;
5664 &lt;span class=&quot;mdl-list__item-secondary-content&quot;&gt;
5665 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5666 &lt;/span&gt;
5667 &lt;/li&gt;
5668 &lt;li class=&quot;mdl-list__item mdl-list__item--three-line&quot;&gt;
5669 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5670 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5671 &lt;span&gt;Aaron Paul&lt;/span&gt;
5672 &lt;span class=&quot;mdl-list__item-text-body&quot;&gt;
5673 Aaron Paul played the role of Jesse in Breaking Bad. He also featured in
5674 the &quot;Need For Speed&quot; Movie.
5675 &lt;/span&gt;
5676 &lt;/span&gt;
5677 &lt;span class=&quot;mdl-list__item-secondary-content&quot;&gt;
5678 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5679 &lt;/span&gt;
5680 &lt;/li&gt;
5681 &lt;li class=&quot;mdl-list__item mdl-list__item--three-line&quot;&gt;
5682 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;
5683 &lt;i class=&quot;material-icons mdl-list__item-avatar&quot;&gt;person&lt;/i&gt;
5684 &lt;span&gt;Bob Odenkirk&lt;/span&gt;
5685 &lt;span class=&quot;mdl-list__item-text-body&quot;&gt;
5686 Bob Odinkrik played the role of Saul in Breaking Bad. Due to public fondness for the
5687 character, Bob stars in his own show now, called &quot;Better Call Saul&quot;.
5688 &lt;/span&gt;
5689 &lt;/span&gt;
5690 &lt;span class=&quot;mdl-list__item-secondary-content&quot;&gt;
5691 &lt;a class=&quot;mdl-list__item-secondary-action&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;material-icons&quot;&gt;star&lt;/i&gt;&lt;/a&gt;
5692 &lt;/span&gt;
5693 &lt;/li&gt;
5694&lt;/ul&gt;
5695</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5696body {
5697 padding: 20px;
5698 background: #fafafa;
5699 position: relative;
5700}
5701&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5702 </div>
5703</div>
5704
5705
5706 <!-- Adding the demo page -->
5707
5708 <style>
5709
5710 </style>
5711
5712 <script>
5713
5714 </script>
5715
5716
5717 <div class="docs-text-styling docs-readme">
5718
5719
5720
5721
5722<h2 id="introduction">Introduction</h2>
5723<p>Lists present multiple line items vertically as a single continuous element. Refer the <a href="https://www.google.com/design/spec/components/lists.html">Material Design
5724Spec</a> to know more about the content options.</p>
5725<h3 id="to-include-the-mdl-list-component-">To include the MDL <strong>list</strong> component:</h3>
5726<h2 id="create-a-list-with-basic-items-">Create a List with basic items.</h2>
5727<p>&nbsp;1. Code a <code>&lt;ul&gt;</code> element with the class <code>mdl-list</code>; this is the &quot;outer&quot; container, intended to hold all of the list&#39;s content.</p>
5728<pre><code class="language-markup">&lt;ul class=&#39;mdl-list&#39;&gt;
5729&lt;/ul&gt;
5730</code></pre>
5731<p>&nbsp;2. Code as many <code>&lt;li&gt;</code> elements as required with the class <code>mdl-list__item</code>; this is intended to hold all of the <strong>item&#39;s</strong> content.</p>
5732<pre><code class="language-markup">&lt;ul class=&#39;mdl-list&#39;&gt;
5733 &lt;li class=&quot;mdl-list__item&quot;&gt;&lt;/li&gt;
5734 &lt;li class=&quot;mdl-list__item&quot;&gt;&lt;/li&gt;
5735 &lt;li class=&quot;mdl-list__item&quot;&gt;&lt;/li&gt;
5736&lt;/ul&gt;
5737</code></pre>
5738<p>&nbsp;3. Add your content as the children of the <code>&lt;li&gt;</code>, with the appropriate content type modification class for example .</p>
5739<pre><code class="language-markup">&lt;ul class=&#39;mdl-list&#39;&gt;
5740 &lt;li class=&quot;mdl-list__item&quot;&gt;
5741 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;&lt;/span&gt;
5742 &lt;/li&gt;
5743 &lt;li class=&quot;mdl-list__item&quot;&gt;
5744 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;&lt;/span&gt;
5745 &lt;/li&gt;
5746 &lt;li class=&quot;mdl-list__item&quot;&gt;
5747 &lt;span class=&quot;mdl-list__item-primary-content&quot;&gt;&lt;/span&gt;
5748 &lt;/li&gt;
5749&lt;/ul&gt;
5750</code></pre>
5751<h2 id="configuration-options">Configuration options</h2>
5752<p>The MDL CSS classes apply various predefined visual enhancements to the list. The table below lists the available classes and their effects.</p>
5753<table>
5754<thead>
5755<tr>
5756<th>MDL Class</th>
5757<th style="text-align:center">Effect</th>
5758<th style="text-align:right">Remark</th>
5759</tr>
5760</thead>
5761<tbody>
5762<tr>
5763<td>.mdl-list</td>
5764<td style="text-align:center">Defines list as an MDL component</td>
5765<td style="text-align:right">-</td>
5766</tr>
5767<tr>
5768<td>.mdl-list__item</td>
5769<td style="text-align:center">Defines the List&#39;s Items</td>
5770<td style="text-align:right">required</td>
5771</tr>
5772<tr>
5773<td>.mdl-list__item--two-line</td>
5774<td style="text-align:center">Defines the List&#39;s Items as Two Line</td>
5775<td style="text-align:right">Optional Two Line List Variant</td>
5776</tr>
5777<tr>
5778<td>.mdl-list__item--three-line</td>
5779<td style="text-align:center">Defines the List&#39;s Items as a Three Line</td>
5780<td style="text-align:right">Optional Three Line List Variant</td>
5781</tr>
5782<tr>
5783<td>.mdl-list__item-primary-content</td>
5784<td style="text-align:center">Defines the primary content sub-division</td>
5785<td style="text-align:right">-</td>
5786</tr>
5787<tr>
5788<td>.mdl-list__item-avatar</td>
5789<td style="text-align:center">Defines the avatar sub-division</td>
5790<td style="text-align:right">-</td>
5791</tr>
5792<tr>
5793<td>.mdl-list__item-icon</td>
5794<td style="text-align:center">Defines the icon sub-division</td>
5795<td style="text-align:right">-</td>
5796</tr>
5797<tr>
5798<td>.mdl-list__item-secondary-content</td>
5799<td style="text-align:center">Defines the secondary content sub-division</td>
5800<td style="text-align:right">requires <code>.mdl-list__item--two-line</code> or <code>.mdl-list__item--three-line</code></td>
5801</tr>
5802<tr>
5803<td>.mdl-list__item-secondary-info</td>
5804<td style="text-align:center">Defines the information sub-division</td>
5805<td style="text-align:right">requires <code>.mdl-list__item--two-line</code> or <code>.mdl-list__item--three-line</code></td>
5806</tr>
5807<tr>
5808<td>.mdl-list__item-secondary-action</td>
5809<td style="text-align:center">Defines the Action sub-division</td>
5810<td style="text-align:right">requires <code>.mdl-list__item--two-line</code> or <code>.mdl-list__item--three-line</code></td>
5811</tr>
5812<tr>
5813<td>.mdl-list__item-text-body</td>
5814<td style="text-align:center">Defines the Text Body sub-division</td>
5815<td style="text-align:right">requires <code>.mdl-list__item--three-line</code></td>
5816</tr>
5817</tbody>
5818</table>
5819
5820
5821
5822 </div>
5823
5824 </div>
5825 </section>
5826 <section id="loading-section" class="mdl-components__page mdl-grid">
5827 <div class="mdl-cell mdl-cell--12-col">
5828 <div class="docs-text-styling component-title">
5829 <h3>Loading</h3>
5830 <p>Indicate loading and progress states.</p>
5831 </div>
5832
5833
5834 <section class="docs-toc docs-text-styling">
5835 <nav class="section-content">
5836 <ul>
5837
5838 <li><a href="#loading-section/progress">Progress bar</a></li>
5839
5840 <li><a href="#loading-section/spinner">Spinner</a></li>
5841
5842 </ul>
5843 </nav>
5844 </section>
5845
5846
5847
5848
5849
5850 <span class="docs-text-styling">
5851 <h1 class="mdl-components__classname" id="loading-section/progress">Progress bar</h1>
5852 </span>
5853
5854 <!-- Add warning, if the component has one -->
5855
5856 <!-- Generating snippets -->
5857
5858
5859
5860<div class="snippet-group">
5861
5862 <div class="snippet-header">
5863 <div class="snippet-demos">
5864 <div class="snippet-demo-padding"></div>
5865
5866
5867
5868
5869 <div class="snippet-demo">
5870 <div class="snippet-demo-container demo-progress demo-progress__progress-default">
5871 <style>
5872 .demo-progress__progress-default .mdl-progress {
5873 width: 50vw;
5874 max-width: 260px;
5875 }
5876</style>
5877<!-- Simple MDL Progress Bar -->
5878<div id="p1" class="mdl-progress mdl-js-progress"></div>
5879<script>
5880 document.querySelector('#p1').addEventListener('mdl-componentupgraded', function() {
5881 this.MaterialProgress.setProgress(44);
5882 });
5883</script>
5884
5885
5886 </div>
5887 </div>
5888 <div class="snippet-demo-padding"></div>
5889 </div>
5890 <div class="snippet-captions">
5891 <div class="snippet-caption-padding"></div>
5892
5893 <div class="snippet-caption">
5894 Default
5895 </div>
5896 <div class="snippet-caption-padding"></div>
5897 </div>
5898 </div>
5899 <div class="snippet-code">
5900 <pre class="language-markup codepen-button-enabled"><code id="progress/progress-default.html">&lt;!-- Simple MDL Progress Bar --&gt;
5901&lt;div id=&quot;p1&quot; class=&quot;mdl-progress mdl-js-progress&quot;&gt;&lt;/div&gt;
5902&lt;script&gt;
5903 document.querySelector(&#39;#p1&#39;).addEventListener(&#39;mdl-componentupgraded&#39;, function() {
5904 this.MaterialProgress.setProgress(44);
5905 });
5906&lt;/script&gt;
5907</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5908body {
5909 padding: 20px;
5910 background: #fafafa;
5911 position: relative;
5912}
5913&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5914 </div>
5915</div>
5916
5917
5918
5919
5920<div class="snippet-group">
5921
5922 <div class="snippet-header">
5923 <div class="snippet-demos">
5924 <div class="snippet-demo-padding"></div>
5925
5926
5927
5928
5929 <div class="snippet-demo">
5930 <div class="snippet-demo-container demo-progress demo-progress__progress-indeterminate">
5931 <style>
5932 .demo-progress__progress-indeterminate .mdl-progress {
5933 width: 50vw;
5934 max-width: 260px;
5935 }
5936</style>
5937<!-- MDL Progress Bar with Indeterminate Progress -->
5938<div id="p2" class="mdl-progress mdl-js-progress mdl-progress__indeterminate"></div>
5939
5940
5941 </div>
5942 </div>
5943 <div class="snippet-demo-padding"></div>
5944 </div>
5945 <div class="snippet-captions">
5946 <div class="snippet-caption-padding"></div>
5947
5948 <div class="snippet-caption">
5949 Indeterminate
5950 </div>
5951 <div class="snippet-caption-padding"></div>
5952 </div>
5953 </div>
5954 <div class="snippet-code">
5955 <pre class="language-markup codepen-button-enabled"><code id="progress/progress-indeterminate.html">&lt;!-- MDL Progress Bar with Indeterminate Progress --&gt;
5956&lt;div id=&quot;p2&quot; class=&quot;mdl-progress mdl-js-progress mdl-progress__indeterminate&quot;&gt;&lt;/div&gt;
5957</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
5958body {
5959 padding: 20px;
5960 background: #fafafa;
5961 position: relative;
5962}
5963&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
5964 </div>
5965</div>
5966
5967
5968
5969
5970<div class="snippet-group">
5971
5972 <div class="snippet-header">
5973 <div class="snippet-demos">
5974 <div class="snippet-demo-padding"></div>
5975
5976
5977
5978
5979 <div class="snippet-demo">
5980 <div class="snippet-demo-container demo-progress demo-progress__progress-buffering">
5981 <style>
5982 .demo-progress__progress-buffering .mdl-progress {
5983 width: 50vw;
5984 max-width: 260px;
5985 }
5986</style>
5987
5988<!-- MDL Progress Bar with Buffering -->
5989<div id="p3" class="mdl-progress mdl-js-progress"></div>
5990<script>
5991 document.querySelector('#p3').addEventListener('mdl-componentupgraded', function() {
5992 this.MaterialProgress.setProgress(33);
5993 this.MaterialProgress.setBuffer(87);
5994 });
5995</script>
5996
5997
5998 </div>
5999 </div>
6000 <div class="snippet-demo-padding"></div>
6001 </div>
6002 <div class="snippet-captions">
6003 <div class="snippet-caption-padding"></div>
6004
6005 <div class="snippet-caption">
6006 Buffering
6007 </div>
6008 <div class="snippet-caption-padding"></div>
6009 </div>
6010 </div>
6011 <div class="snippet-code">
6012 <pre class="language-markup codepen-button-enabled"><code id="progress/progress-buffering.html">&lt;!-- MDL Progress Bar with Buffering --&gt;
6013&lt;div id=&quot;p3&quot; class=&quot;mdl-progress mdl-js-progress&quot;&gt;&lt;/div&gt;
6014&lt;script&gt;
6015 document.querySelector(&#39;#p3&#39;).addEventListener(&#39;mdl-componentupgraded&#39;, function() {
6016 this.MaterialProgress.setProgress(33);
6017 this.MaterialProgress.setBuffer(87);
6018 });
6019&lt;/script&gt;
6020</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
6021body {
6022 padding: 20px;
6023 background: #fafafa;
6024 position: relative;
6025}
6026&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
6027 </div>
6028</div>
6029
6030
6031 <!-- Adding the demo page -->
6032
6033 <style>
6034
6035 </style>
6036
6037 <script>
6038
6039 </script>
6040
6041
6042 <div class="docs-text-styling docs-readme">
6043
6044
6045
6046
6047<h2 id="introduction">Introduction</h2>
6048<p>The Material Design Lite (MDL) <strong>progress</strong> component is a visual indicator of background activity in a web page or application. A progress indicator consists of a (typically) horizontal bar containing some animation that conveys a sense of motion. While some progress devices indicate an approximate or specific percentage of completion, the MDL progress component simply communicates the fact that an activity is ongoing and is not yet complete.</p>
6049<p>Progress indicators are an established but non-standardized feature in user interfaces, and provide users with a visual clue to an application&#39;s status. Their design and use is therefore an important factor in the overall user experience. See the progress component&#39;s <a href="http://www.google.com/design/spec/components/progress-activity.html">Material Design specifications page</a> for details.</p>
6050<h3 id="to-include-an-mdl-progress-component-">To include an MDL <strong>progress</strong> component:</h3>
6051<p>&nbsp;1. Code a <code>&lt;div&gt;</code> element. Include any desired attributes and values, such as an id or width &mdash; typically done using external CSS rather than the inline <code>style</code> attribute as shown here.</p>
6052<pre><code class="language-markup">&lt;div id=&quot;prog1&quot; style=&quot;width:250px&quot;&gt;&lt;/div&gt;
6053</code></pre>
6054<p>&nbsp;2. Add one or more MDL classes, separated by spaces, to the div using the <code>class</code> attribute.</p>
6055<pre><code class="language-markup">&lt;div id=&quot;prog1&quot; style=&quot;width:250px&quot; class=&quot;mdl-js-progress&quot;&gt;&lt;/div&gt;
6056</code></pre>
6057<p>The progress component is ready for use.</p>
6058<h4 id="examples">Examples</h4>
6059<p>A static (non-animated) progress indicator.</p>
6060<pre><code class="language-markup">&lt;div id=&quot;progstatic&quot; style=&quot;width:250px&quot; class=&quot;mdl-js-progress&quot;&gt;&lt;/div&gt;
6061</code></pre>
6062<p>An active (animated) progress indicator.</p>
6063<pre><code class="language-markup">&lt;div id=&quot;progactive&quot; style=&quot;width:200px&quot; class=&quot;mdl-js-progress
6064 mdl-progress--indeterminate&quot;&gt;&lt;/div&gt;
6065</code></pre>
6066<h2 id="configuration-options">Configuration options</h2>
6067<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the progress indicator. The table below lists the available classes and their effects.</p>
6068<table>
6069<thead>
6070<tr>
6071<th>MDL class</th>
6072<th>Effect</th>
6073<th>Remarks</th>
6074</tr>
6075</thead>
6076<tbody>
6077<tr>
6078<td><code>mdl-js-progress</code></td>
6079<td>Assigns basic MDL behavior to progress indicator</td>
6080<td>Required</td>
6081</tr>
6082<tr>
6083<td><code>mdl-progress--indeterminate</code></td>
6084<td>Applies animation effect</td>
6085<td>Optional</td>
6086</tr>
6087</tbody>
6088</table>
6089<blockquote>
6090<p>Note: <code>mdl-progress__intermediate</code> does exist within the codebase. It is deprecated since the name is not in BEM alignment. It will be removed in 2.0.</p>
6091</blockquote>
6092
6093
6094
6095 </div>
6096
6097
6098
6099 <span class="docs-text-styling">
6100 <h1 class="mdl-components__classname" id="loading-section/spinner">Spinner</h1>
6101 </span>
6102
6103 <!-- Add warning, if the component has one -->
6104
6105 <!-- Generating snippets -->
6106
6107
6108
6109<div class="snippet-group">
6110
6111 <div class="snippet-header">
6112 <div class="snippet-demos">
6113 <div class="snippet-demo-padding"></div>
6114
6115
6116
6117
6118 <div class="snippet-demo">
6119 <div class="snippet-demo-container demo-spinner demo-spinner__spinner-default">
6120 <!-- MDL Spinner Component -->
6121<div class="mdl-spinner mdl-js-spinner is-active"></div>
6122
6123 </div>
6124 </div>
6125
6126
6127
6128 <div class="snippet-demo">
6129 <div class="snippet-demo-container demo-spinner demo-spinner__spinner-single-color">
6130 <!-- MDL Spinner Component with Single Color -->
6131<div class="mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active"></div>
6132
6133 </div>
6134 </div>
6135 <div class="snippet-demo-padding"></div>
6136 </div>
6137 <div class="snippet-captions">
6138 <div class="snippet-caption-padding"></div>
6139
6140 <div class="snippet-caption">
6141 Default
6142 </div>
6143 <div class="snippet-caption">
6144 Single color
6145 </div>
6146 <div class="snippet-caption-padding"></div>
6147 </div>
6148 </div>
6149 <div class="snippet-code">
6150 <pre class="language-markup codepen-button-enabled"><code id="spinner/spinner-default.html">&lt;!-- MDL Spinner Component --&gt;
6151&lt;div class=&quot;mdl-spinner mdl-js-spinner is-active&quot;&gt;&lt;/div&gt;
6152</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="spinner/spinner-single-color.html">&lt;!-- MDL Spinner Component with Single Color --&gt;
6153&lt;div class=&quot;mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active&quot;&gt;&lt;/div&gt;
6154</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
6155body {
6156 padding: 20px;
6157 background: #fafafa;
6158 position: relative;
6159}
6160&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
6161 </div>
6162</div>
6163
6164
6165 <!-- Adding the demo page -->
6166
6167 <style>
6168
6169 </style>
6170
6171 <script>
6172
6173 </script>
6174
6175
6176 <div class="docs-text-styling docs-readme">
6177
6178
6179
6180
6181<h2 id="introduction">Introduction</h2>
6182<p>The Material Design Lite (MDL) <strong>spinner</strong> component is an enhanced replacement for the classic &quot;wait cursor&quot; (which varies significantly among hardware and software versions) and indicates that there is an ongoing process, the results of which are not yet available. A spinner consists of an open circle that changes colors as it animates in a clockwise direction, and clearly communicates that a process has been started but not completed.</p>
6183<p>A spinner performs no action itself, either by its display nor when the user clicks or touches it, and does not indicate a process&#39;s specific progress or degree of completion. The MDL spinner component provides various types of spinners, and allows you to add display effects.</p>
6184<p>Spinners are a fairly new feature of most user interfaces, and provide users with a consistent visual cue about ongoing activity, regardless of hardware device, operating system, or browser environment. Their design and use is an important factor in the overall user experience.</p>
6185<h3 id="to-include-an-mdl-spinner-component-">To include an MDL <strong>spinner</strong> component:</h3>
6186<p>&nbsp;1. Code an element, such as a <code>&lt;div&gt;</code>, <code>&lt;p&gt;</code>, or <code>&lt;span&gt;</code>, to contain the spinner; the element should have no content of its own.</p>
6187<pre><code class="language-markup">&lt;div&gt;&lt;/div&gt;
6188</code></pre>
6189<p>&nbsp;2. Add one or more MDL classes, separated by spaces, to the container using the <code>class</code> attribute.</p>
6190<pre><code class="language-markup">&lt;div class=&quot;mdl-spinner mdl-js-spinner is-active&quot;&gt;&lt;/div&gt;
6191</code></pre>
6192<p>The spinner component is ready for use.</p>
6193<h4 id="examples">Examples</h4>
6194<p>A default spinner in a div.</p>
6195<pre><code class="language-markup">&lt;div class=&quot;mdl-spinner mdl-js-spinner is-active&quot;&gt;&lt;/div&gt;
6196</code></pre>
6197<p>A single-color spinner in a paragraph.</p>
6198<pre><code class="language-markup">&lt;p class=&quot;mdl-spinner mdl-js-spinner mdl-spinner--single-color is-active&quot;&gt;&lt;/p&gt;
6199</code></pre>
6200<h2 id="configuration-options">Configuration options</h2>
6201<p>The MDL CSS classes apply various predefined visual enhancements to the spinner. The table below lists the available classes and their effects.</p>
6202<table>
6203<thead>
6204<tr>
6205<th>MDL class</th>
6206<th>Effect</th>
6207<th>Remarks</th>
6208</tr>
6209</thead>
6210<tbody>
6211<tr>
6212<td><code>mdl-spinner</code></td>
6213<td>Defines the container as an MDL spinner component</td>
6214<td>Required</td>
6215</tr>
6216<tr>
6217<td><code>mdl-js-spinner</code></td>
6218<td>Assigns basic MDL behavior to spinner</td>
6219<td>Required</td>
6220</tr>
6221<tr>
6222<td><code>is-active</code></td>
6223<td>Makes the spinner visible and animated</td>
6224<td>Optional</td>
6225</tr>
6226<tr>
6227<td><code>mdl-spinner--single-color</code></td>
6228<td>Uses a single (primary palette) color instead of changing colors</td>
6229<td>Optional</td>
6230</tr>
6231</tbody>
6232</table>
6233<blockquote>
6234<p><strong>Note:</strong> There is no specific <em>disabled</em> version of a spinner; the presence or absence of the <code>is-active</code> class determines whether the spinner is visible. For example, this spinner is inactive and invisible: <code>&lt;div class=&quot;mdl-spinner mdl-js-spinner&quot;&gt;&lt;/div&gt;</code>
6235This attribute may be added or removed programmatically via scripting.</p>
6236</blockquote>
6237
6238
6239
6240 </div>
6241
6242 </div>
6243 </section>
6244 <section id="menus-section" class="mdl-components__page mdl-grid">
6245 <div class="mdl-cell mdl-cell--12-col">
6246 <div class="docs-text-styling component-title">
6247 <h3>Menus</h3>
6248 <p>Lists of clickable actions.</p>
6249 </div>
6250
6251
6252
6253
6254
6255
6256 <!-- Add warning, if the component has one -->
6257
6258 <!-- Generating snippets -->
6259
6260
6261
6262<div class="snippet-group">
6263
6264 <div class="snippet-header">
6265 <div class="snippet-demos">
6266 <div class="snippet-demo-padding"></div>
6267
6268
6269
6270
6271 <div class="snippet-demo">
6272 <div class="snippet-demo-container demo-menu demo-menu__lower-left">
6273 <style>
6274 .demo-menu.demo-menu__lower-left .container {
6275 position: relative;
6276 width: 200px;
6277 }
6278 .demo-menu.demo-menu__lower-left .background {
6279 background: white;
6280 height: 148px;
6281 width: 100%;
6282 }
6283 .demo-menu.demo-menu__lower-left .bar {
6284 box-sizing: border-box;
6285 background: #3F51B5;
6286 color: white;
6287 width: 100%;
6288 padding: 16px;
6289 }
6290</style>
6291
6292<div class="container mdl-shadow--2dp">
6293 <div class="bar">
6294 <!-- Left aligned menu below button -->
6295<button id="demo-menu-lower-left"
6296 class="mdl-button mdl-js-button mdl-button--icon">
6297 <i class="material-icons">more_vert</i>
6298</button>
6299
6300<ul class="mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effect"
6301 for="demo-menu-lower-left">
6302 <li class="mdl-menu__item">Some Action</li>
6303 <li class="mdl-menu__item mdl-menu__item--full-bleed-divider">Another Action</li>
6304 <li disabled class="mdl-menu__item">Disabled Action</li>
6305 <li class="mdl-menu__item">Yet Another Action</li>
6306</ul>
6307
6308 </div>
6309 <div class="background"></div>
6310</div>
6311
6312 </div>
6313 </div>
6314
6315
6316
6317 <div class="snippet-demo">
6318 <div class="snippet-demo-container demo-menu demo-menu__lower-right">
6319 <style>
6320 .demo-menu.demo-menu__lower-right .container {
6321 position: relative;
6322 width: 200px;
6323 }
6324 .demo-menu.demo-menu__lower-right .background {
6325 background: white;
6326 height: 148px;
6327 width: 100%;
6328 }
6329 .demo-menu.demo-menu__lower-right .bar {
6330 box-sizing: border-box;
6331 position: relative;
6332 background: #3F51B5;
6333 color: white;
6334 height: 64px;
6335 width: 100%;
6336 padding: 16px;
6337 }
6338 .demo-menu.demo-menu__lower-right .wrapper {
6339 box-sizing: border-box;
6340 position: absolute;
6341 right: 16px;
6342 }
6343</style>
6344
6345<div class="container mdl-shadow--2dp">
6346 <div class="bar">
6347 <div class="wrapper">
6348 <!-- Right aligned menu below button -->
6349<button id="demo-menu-lower-right"
6350 class="mdl-button mdl-js-button mdl-button--icon">
6351 <i class="material-icons">more_vert</i>
6352</button>
6353
6354<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
6355 for="demo-menu-lower-right">
6356 <li class="mdl-menu__item">Some Action</li>
6357 <li class="mdl-menu__item">Another Action</li>
6358 <li disabled class="mdl-menu__item">Disabled Action</li>
6359 <li class="mdl-menu__item">Yet Another Action</li>
6360</ul>
6361
6362 </div>
6363 </div>
6364 <div class="background"></div>
6365</div>
6366
6367 </div>
6368 </div>
6369 <div class="snippet-demo-padding"></div>
6370 </div>
6371 <div class="snippet-captions">
6372 <div class="snippet-caption-padding"></div>
6373
6374 <div class="snippet-caption">
6375 Lower left
6376 </div>
6377 <div class="snippet-caption">
6378 Lower right
6379 </div>
6380 <div class="snippet-caption-padding"></div>
6381 </div>
6382 </div>
6383 <div class="snippet-code">
6384 <pre class="language-markup codepen-button-enabled"><code id="menu/lower-left.html">&lt;!-- Left aligned menu below button --&gt;
6385&lt;button id=&quot;demo-menu-lower-left&quot;
6386 class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6387 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6388&lt;/button&gt;
6389
6390&lt;ul class=&quot;mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effect&quot;
6391 for=&quot;demo-menu-lower-left&quot;&gt;
6392 &lt;li class=&quot;mdl-menu__item&quot;&gt;Some Action&lt;/li&gt;
6393 &lt;li class=&quot;mdl-menu__item mdl-menu__item--full-bleed-divider&quot;&gt;Another Action&lt;/li&gt;
6394 &lt;li disabled class=&quot;mdl-menu__item&quot;&gt;Disabled Action&lt;/li&gt;
6395 &lt;li class=&quot;mdl-menu__item&quot;&gt;Yet Another Action&lt;/li&gt;
6396&lt;/ul&gt;
6397</code><div class="codepen-extra-css">&lt;style&gt;#demo-menu-lower-left {
6398 margin-left: 40%;
6399}
6400&lt;/style&gt;</div><code id="menu/lower-right.html">&lt;!-- Right aligned menu below button --&gt;
6401&lt;button id=&quot;demo-menu-lower-right&quot;
6402 class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6403 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6404&lt;/button&gt;
6405
6406&lt;ul class=&quot;mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect&quot;
6407 for=&quot;demo-menu-lower-right&quot;&gt;
6408 &lt;li class=&quot;mdl-menu__item&quot;&gt;Some Action&lt;/li&gt;
6409 &lt;li class=&quot;mdl-menu__item&quot;&gt;Another Action&lt;/li&gt;
6410 &lt;li disabled class=&quot;mdl-menu__item&quot;&gt;Disabled Action&lt;/li&gt;
6411 &lt;li class=&quot;mdl-menu__item&quot;&gt;Yet Another Action&lt;/li&gt;
6412&lt;/ul&gt;
6413</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
6414body {
6415 padding: 20px;
6416 background: #fafafa;
6417 position: relative;
6418}
6419&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
6420 </div>
6421</div>
6422
6423
6424
6425
6426<div class="snippet-group">
6427
6428 <div class="snippet-header">
6429 <div class="snippet-demos">
6430 <div class="snippet-demo-padding"></div>
6431
6432
6433
6434
6435 <div class="snippet-demo">
6436 <div class="snippet-demo-container demo-menu demo-menu__top-left">
6437 <style>
6438 .demo-menu.demo-menu__top-left .container {
6439 position: relative;
6440 width: 200px;
6441 }
6442 .demo-menu.demo-menu__top-left .background {
6443 background: white;
6444 height: 148px;
6445 width: 100%;
6446 }
6447 .demo-menu.demo-menu__top-left .bar {
6448 box-sizing: border-box;
6449 background: #3F51B5;
6450 color: white;
6451 width: 100%;
6452 padding: 16px;
6453 }
6454</style>
6455
6456<div class="container mdl-shadow--2dp">
6457 <div class="background"></div>
6458 <div class="bar">
6459 <!-- Left aligned menu on top of button -->
6460<button id="demo-menu-top-left"
6461 class="mdl-button mdl-js-button mdl-button--icon">
6462 <i class="material-icons">more_vert</i>
6463</button>
6464
6465<ul class="mdl-menu mdl-menu--top-left mdl-js-menu mdl-js-ripple-effect"
6466 data-mdl-for="demo-menu-top-left">
6467 <li class="mdl-menu__item">Some Action</li>
6468 <li class="mdl-menu__item">Another Action</li>
6469 <li disabled class="mdl-menu__item">Disabled Action</li>
6470 <li class="mdl-menu__item">Yet Another Action</li>
6471</ul>
6472
6473 </div>
6474</div>
6475
6476 </div>
6477 </div>
6478
6479
6480
6481 <div class="snippet-demo">
6482 <div class="snippet-demo-container demo-menu demo-menu__top-right">
6483 <style>
6484 .demo-menu.demo-menu__top-right .container {
6485 position: relative;
6486 width: 200px;
6487 }
6488 .demo-menu.demo-menu__top-right .background {
6489 background: white;
6490 height: 148px;
6491 width: 100%;
6492 }
6493 .demo-menu.demo-menu__top-right .bar {
6494 box-sizing: border-box;
6495 position: relative;
6496 background: #3F51B5;
6497 color: white;
6498 height: 64px;
6499 width: 100%;
6500 padding: 16px;
6501 }
6502 .demo-menu.demo-menu__top-right .wrapper {
6503 box-sizing: border-box;
6504 position: absolute;
6505 right: 16px;
6506 }
6507</style>
6508
6509<div class="container mdl-shadow--2dp">
6510 <div class="background"></div>
6511 <div class="bar">
6512 <div class="wrapper">
6513 <!-- Right aligned menu on top of button -->
6514<button id="demo-menu-top-right"
6515 class="mdl-button mdl-js-button mdl-button--icon">
6516 <i class="material-icons">more_vert</i>
6517</button>
6518
6519<ul class="mdl-menu mdl-menu--top-right mdl-js-menu mdl-js-ripple-effect"
6520 data-mdl-for="demo-menu-top-right">
6521 <li class="mdl-menu__item">Some Action</li>
6522 <li class="mdl-menu__item">Another Action</li>
6523 <li disabled class="mdl-menu__item">Disabled Action</li>
6524 <li class="mdl-menu__item">Yet Another Action</li>
6525</ul>
6526
6527 </div>
6528 </div>
6529</div>
6530
6531 </div>
6532 </div>
6533 <div class="snippet-demo-padding"></div>
6534 </div>
6535 <div class="snippet-captions">
6536 <div class="snippet-caption-padding"></div>
6537
6538 <div class="snippet-caption">
6539 Top left
6540 </div>
6541 <div class="snippet-caption">
6542 Top right
6543 </div>
6544 <div class="snippet-caption-padding"></div>
6545 </div>
6546 </div>
6547 <div class="snippet-code">
6548 <pre class="language-markup codepen-button-enabled"><code id="menu/top-left.html">&lt;!-- Left aligned menu on top of button --&gt;
6549&lt;button id=&quot;demo-menu-top-left&quot;
6550 class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6551 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6552&lt;/button&gt;
6553
6554&lt;ul class=&quot;mdl-menu mdl-menu--top-left mdl-js-menu mdl-js-ripple-effect&quot;
6555 data-mdl-for=&quot;demo-menu-top-left&quot;&gt;
6556 &lt;li class=&quot;mdl-menu__item&quot;&gt;Some Action&lt;/li&gt;
6557 &lt;li class=&quot;mdl-menu__item&quot;&gt;Another Action&lt;/li&gt;
6558 &lt;li disabled class=&quot;mdl-menu__item&quot;&gt;Disabled Action&lt;/li&gt;
6559 &lt;li class=&quot;mdl-menu__item&quot;&gt;Yet Another Action&lt;/li&gt;
6560&lt;/ul&gt;
6561</code><div class="codepen-extra-css">&lt;style&gt;#demo-menu-top-left {
6562 margin-left: 40%;
6563}
6564
6565#demo-menu-top-left,
6566#demo-menu-top-right {
6567 margin-top: 250px;
6568}
6569&lt;/style&gt;</div><code id="menu/top-right.html">&lt;!-- Right aligned menu on top of button --&gt;
6570&lt;button id=&quot;demo-menu-top-right&quot;
6571 class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6572 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6573&lt;/button&gt;
6574
6575&lt;ul class=&quot;mdl-menu mdl-menu--top-right mdl-js-menu mdl-js-ripple-effect&quot;
6576 data-mdl-for=&quot;demo-menu-top-right&quot;&gt;
6577 &lt;li class=&quot;mdl-menu__item&quot;&gt;Some Action&lt;/li&gt;
6578 &lt;li class=&quot;mdl-menu__item&quot;&gt;Another Action&lt;/li&gt;
6579 &lt;li disabled class=&quot;mdl-menu__item&quot;&gt;Disabled Action&lt;/li&gt;
6580 &lt;li class=&quot;mdl-menu__item&quot;&gt;Yet Another Action&lt;/li&gt;
6581&lt;/ul&gt;
6582</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
6583body {
6584 padding: 20px;
6585 background: #fafafa;
6586 position: relative;
6587}
6588&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
6589 </div>
6590</div>
6591
6592
6593 <!-- Adding the demo page -->
6594
6595 <style>
6596
6597 </style>
6598
6599 <script>
6600
6601 </script>
6602
6603
6604 <div class="docs-text-styling docs-readme">
6605
6606
6607
6608
6609<h2 id="introduction">Introduction</h2>
6610<p>The Material Design Lite (MDL) <strong>menu</strong> component is a user interface element that allows users to select one of a number of options. The selection typically results in an action initiation, a setting change, or other observable effect. Menu options are always presented in sets of two or more, and options may be programmatically enabled or disabled as required. The menu appears when the user is asked to choose among a series of options, and is usually dismissed after the choice is made.</p>
6611<p>Menus are an established but non-standardized feature in user interfaces, and allow users to make choices that direct the activity, progress, or characteristics of software. Their design and use is an important factor in the overall user experience. See the menu component&#39;s <a href="http://www.google.com/design/spec/components/menus.html">Material Design specifications page</a> for details.</p>
6612<h3 id="to-include-an-mdl-menu-component-">To include an MDL <strong>menu</strong> component:</h3>
6613<blockquote>
6614<p><strong>Note:</strong> The menu requires a non-static positioned parent element. Positioning options may not work properly if the menu is inside of a statically positioned node.</p>
6615</blockquote>
6616<p>&nbsp;1. Code a <code>&lt;button&gt;</code> element; this is the clickable toggle that will show and hide the menu options. Include an <code>id</code> attribute whose value will match the <code>for</code> (or <code>data-mdl-for</code>) attribute of the unordered list coded in the next step. Inside the button, code a <code>&lt;i&gt;</code> or <code>&lt;span&gt;</code> element to contain an icon of your choice.</p>
6617<pre><code class="language-markup">&lt;button id=&quot;menu1&quot;&gt;
6618 &lt;i&gt;&lt;/i&gt;
6619&lt;/button&gt;
6620</code></pre>
6621<p>&nbsp;2. Code a <code>&lt;ul&gt;</code> unordered list element; this is the container that holds the options. Include a <code>for</code> attribute whose value matches the <code>id</code> attribute of the button element.</p>
6622<pre><code class="language-markup">&lt;ul for=&quot;menu1&quot;&gt;
6623&lt;/ul&gt;
6624</code></pre>
6625<p>&nbsp;3. Inside the unordered list, code one <code>&lt;li&gt;</code> element for each option. Include any desired attributes and values, such as an id or event handler, and add a text caption as appropriate.</p>
6626<pre><code class="language-markup">&lt;ul for=&quot;menu1&quot;&gt;
6627 &lt;li&gt;Continue&lt;/li&gt;
6628 &lt;li&gt;Stop&lt;/li&gt;
6629 &lt;li&gt;Pause&lt;/li&gt;
6630&lt;/ul&gt;
6631</code></pre>
6632<p>&nbsp;4. Add one or more MDL classes, separated by spaces, to the button and span elements using the <code>class</code> attribute.</p>
6633<pre><code class="language-markup">&lt;button id=&quot;menu1&quot; class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6634 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6635&lt;/button&gt;
6636</code></pre>
6637<p>&nbsp;5. Add one or more MDL classes, separated by spaces, to the unordered list and the list items using the <code>class</code> attribute.</p>
6638<pre><code class="language-markup">&lt;ul class=&quot;mdl-menu mdl-js-menu&quot; for=&quot;menu1&quot;&gt;
6639 &lt;li class=&quot;mdl-menu__item&quot;&gt;Continue&lt;/li&gt;
6640 &lt;li class=&quot;mdl-menu__item&quot;&gt;Stop&lt;/li&gt;
6641 &lt;li class=&quot;mdl-menu__item&quot;&gt;Pause&lt;/li&gt;
6642&lt;/ul&gt;
6643</code></pre>
6644<p>The menu component is ready for use.</p>
6645<h4 id="examples">Examples</h4>
6646<p>A menu with three options.</p>
6647<pre><code class="language-markup">&lt;button id=&quot;menu-speed&quot; class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6648 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6649&lt;/button&gt;
6650&lt;ul class=&quot;mdl-menu mdl-js-menu&quot; for=&quot;menu-speed&quot;&gt;
6651 &lt;li class=&quot;mdl-menu__item&quot;&gt;Fast&lt;/li&gt;
6652 &lt;li class=&quot;mdl-menu__item&quot;&gt;Medium&lt;/li&gt;
6653 &lt;li class=&quot;mdl-menu__item&quot;&gt;Slow&lt;/li&gt;
6654&lt;/ul&gt;
6655</code></pre>
6656<p>A menu with three options, with ripple effect on button and option links.</p>
6657<pre><code class="language-markup">&lt;button id=&quot;menu-speed&quot; class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6658 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6659&lt;/button&gt;
6660&lt;ul class=&quot;mdl-menu mdl-js-menu mdl-js-ripple-effect&quot; for=&quot;menu-speed&quot;&gt;
6661 &lt;li class=&quot;mdl-menu__item&quot;&gt;Fast&lt;/li&gt;
6662 &lt;li class=&quot;mdl-menu__item&quot;&gt;Medium&lt;/li&gt;
6663 &lt;li class=&quot;mdl-menu__item&quot;&gt;Slow&lt;/li&gt;
6664&lt;/ul&gt;
6665</code></pre>
6666<p>A menu with three options, the second of which is disabled by default.</p>
6667<pre><code class="language-markup">&lt;button id=&quot;menu-speed&quot; class=&quot;mdl-button mdl-js-button mdl-button--icon&quot;&gt;
6668 &lt;i class=&quot;material-icons&quot;&gt;more_vert&lt;/i&gt;
6669&lt;/button&gt;
6670&lt;ul class=&quot;mdl-menu mdl-js-menu&quot; for=&quot;menu-speed&quot;&gt;
6671 &lt;li class=&quot;mdl-menu__item&quot;&gt;Fast&lt;/li&gt;
6672 &lt;li class=&quot;mdl-menu__item&quot; disabled&gt;Medium&lt;/li&gt;
6673 &lt;li class=&quot;mdl-menu__item&quot;&gt;Slow&lt;/li&gt;
6674&lt;/ul&gt;
6675</code></pre>
6676<h2 id="configuration-options">Configuration options</h2>
6677<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the menu. The table below lists the available classes and their effects.</p>
6678<table>
6679<thead>
6680<tr>
6681<th>MDL class</th>
6682<th>Effect</th>
6683<th>Remarks</th>
6684</tr>
6685</thead>
6686<tbody>
6687<tr>
6688<td><code>mdl-button</code></td>
6689<td>Defines button as an MDL component</td>
6690<td>Required on button element</td>
6691</tr>
6692<tr>
6693<td><code>mdl-js-button</code></td>
6694<td>Assigns basic MDL behavior to button</td>
6695<td>Required on button element</td>
6696</tr>
6697<tr>
6698<td><code>mdl-button--icon</code></td>
6699<td>Applies <em>icon</em> (small plain circular) display effect to button</td>
6700<td>Required on button element</td>
6701</tr>
6702<tr>
6703<td><code>material-icons</code></td>
6704<td>Defines span as a material icon</td>
6705<td>Required on an inline element</td>
6706</tr>
6707<tr>
6708<td><code>mdl-menu</code></td>
6709<td>Defines an unordered list container as an MDL component</td>
6710<td>Required on ul element</td>
6711</tr>
6712<tr>
6713<td><code>mdl-js-menu</code></td>
6714<td>Assigns basic MDL behavior to menu</td>
6715<td>Required on ul element</td>
6716</tr>
6717<tr>
6718<td><code>mdl-menu__item</code></td>
6719<td>Defines buttons as MDL menu options and assigns basic MDL behavior</td>
6720<td>Required on list item elements</td>
6721</tr>
6722<tr>
6723<td><code>mdl-menu__item--full-bleed-divider</code></td>
6724<td>Modifies an item to have a full bleed divider between it and the next list item.</td>
6725<td>Optional on list item elements</td>
6726</tr>
6727<tr>
6728<td><code>mdl-js-ripple-effect</code></td>
6729<td>Applies <em>ripple</em> click effect to option links</td>
6730<td>Optional; goes on unordered list element</td>
6731</tr>
6732<tr>
6733<td><code>mdl-menu--top-left</code></td>
6734<td>Positions menu above button, aligns left edge of menu with button</td>
6735<td>Optional; goes on unordered list element</td>
6736</tr>
6737<tr>
6738<td>(none)</td>
6739<td>Positions menu below button, aligns left edge of menu with button</td>
6740<td>Default</td>
6741</tr>
6742<tr>
6743<td><code>mdl-menu--top-right</code></td>
6744<td>Positions menu above button, aligns right edge of menu with button</td>
6745<td>Optional; goes on unordered list element</td>
6746</tr>
6747<tr>
6748<td><code>mdl-menu--bottom-right</code></td>
6749<td>Positions menu below button, aligns right edge of menu with button</td>
6750<td>Optional; goes on unordered list element</td>
6751</tr>
6752</tbody>
6753</table>
6754<p>(1) The &quot;more-vert&quot; icon class is used here as an example. Other icons can be used by modifying the class name. For a list of available icons, see <a href="http://google.github.io/web-starter-kit/latest/styleguide/icons/demo.html">this page</a>; hover over an icon to see its class name.</p>
6755<p>(2) The <code>i</code> or <code>span</code> element in &quot;button&quot;&quot; element can be used interchangeably.</p>
6756<blockquote>
6757<p><strong>Note:</strong> Disabled versions of the menu options are provided, and are invoked with the standard HTML boolean attribute <code>disabled</code> or <code>data-mdl-disabled</code>. <code>&lt;li class=&quot;mdl-menu__item&quot; disabled&gt;Medium&lt;/li&gt;</code>
6758This attribute may be added or removed programmatically via scripting.</p>
6759</blockquote>
6760
6761
6762
6763 </div>
6764
6765 </div>
6766 </section>
6767 <section id="sliders-section" class="mdl-components__page mdl-grid">
6768 <div class="mdl-cell mdl-cell--12-col">
6769 <div class="docs-text-styling component-title">
6770 <h3>Sliders</h3>
6771 <p>Selecting a value out of a range.</p>
6772 </div>
6773
6774
6775
6776
6777
6778
6779 <!-- Add warning, if the component has one -->
6780
6781 <!-- Generating snippets -->
6782
6783
6784
6785<div class="snippet-group">
6786
6787 <div class="snippet-header">
6788 <div class="snippet-demos">
6789 <div class="snippet-demo-padding"></div>
6790
6791
6792
6793
6794 <div class="snippet-demo">
6795 <div class="snippet-demo-container demo-slider demo-slider__slider-default">
6796 <style>
6797 .demo-slider__slider-default .mdl-slider {
6798 width: 30vw;
6799 max-width: 260px;
6800 }
6801</style>
6802<!-- Default Slider -->
6803<input class="mdl-slider mdl-js-slider" type="range"
6804 min="0" max="100" value="0" tabindex="0">
6805
6806
6807 </div>
6808 </div>
6809
6810
6811
6812 <div class="snippet-demo">
6813 <div class="snippet-demo-container demo-slider demo-slider__slider-starting-value">
6814 <style>
6815 .demo-slider__slider-starting-value .mdl-slider {
6816 width: 30vw;
6817 max-width: 260px;
6818 }
6819</style>
6820
6821<!-- Slider with Starting Value -->
6822<input class="mdl-slider mdl-js-slider" type="range"
6823 min="0" max="100" value="25" tabindex="0">
6824
6825
6826 </div>
6827 </div>
6828 <div class="snippet-demo-padding"></div>
6829 </div>
6830 <div class="snippet-captions">
6831 <div class="snippet-caption-padding"></div>
6832
6833 <div class="snippet-caption">
6834 Default slider
6835 </div>
6836 <div class="snippet-caption">
6837 Starting value
6838 </div>
6839 <div class="snippet-caption-padding"></div>
6840 </div>
6841 </div>
6842 <div class="snippet-code">
6843 <pre class="language-markup codepen-button-enabled"><code id="slider/slider-default.html">&lt;!-- Default Slider --&gt;
6844&lt;input class=&quot;mdl-slider mdl-js-slider&quot; type=&quot;range&quot;
6845 min=&quot;0&quot; max=&quot;100&quot; value=&quot;0&quot; tabindex=&quot;0&quot;&gt;
6846</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="slider/slider-starting-value.html">&lt;!-- Slider with Starting Value --&gt;
6847&lt;input class=&quot;mdl-slider mdl-js-slider&quot; type=&quot;range&quot;
6848 min=&quot;0&quot; max=&quot;100&quot; value=&quot;25&quot; tabindex=&quot;0&quot;&gt;
6849</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
6850body {
6851 padding: 20px;
6852 background: #fafafa;
6853 position: relative;
6854}
6855&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
6856 </div>
6857</div>
6858
6859
6860 <!-- Adding the demo page -->
6861
6862 <style>
6863
6864 </style>
6865
6866 <script>
6867
6868 </script>
6869
6870
6871 <div class="docs-text-styling docs-readme">
6872
6873
6874
6875
6876<h2 id="introduction">Introduction</h2>
6877<p>The Material Design Lite (MDL) <strong>slider</strong> component is an enhanced version of the new HTML5 <code>&lt;input type=&quot;range&quot;&gt;</code> element. A slider consists of a horizontal line upon which sits a small, movable disc (the <em>thumb</em>) and, typically, text that clearly communicates a value that will be set when the user moves it.</p>
6878<p>Sliders are a fairly new feature in user interfaces, and allow users to choose a value from a predetermined range by moving the thumb through the range (lower values to the left, higher values to the right). Their design and use is an important factor in the overall user experience. See the slider component&#39;s <a href="http://www.google.com/design/spec/components/sliders.html">Material Design specifications page</a> for details.</p>
6879<p>The enhanced slider component may be initially or programmatically <em>disabled</em>.</p>
6880<h3 id="to-include-an-mdl-slider-component-">To include an MDL <strong>slider</strong> component:</h3>
6881<p>&nbsp;1. Code a <code>&lt;p&gt;</code> paragraph element and style it as desired. Include a CSS <code>width</code> property (directly or via a CSS class), which determines the slider&#39;s size.</p>
6882<pre><code class="language-markup">&lt;p style=&quot;width:300px&quot;&gt;
6883...
6884&lt;/p&gt;
6885</code></pre>
6886<p>&nbsp;2. Inside the paragraph container, code an <code>&lt;input&gt;</code> element and give it a <code>type</code> attribute whose value is <code>&quot;range&quot;</code>. Also give it an <code>id</code> attribute to make it available for scripting, and <code>min</code> and <code>max</code> attributes whose values specify the slider&#39;s range. Give it a <code>value</code> attribute whose value sets the initial thumb position (optional; if omitted, defaults to 50% of the maximum), and a <code>step</code> attribute whose value specifies the increment by which the thumb moves (also optional; if omitted, defaults to 1). Finally, give it an event handler to be executed when the user changes the slider&#39;s value.</p>
6887<pre><code class="language-markup">&lt;p style=&quot;width:300px&quot;&gt;
6888 &lt;input type=&quot;range&quot; id=&quot;s1&quot; min=&quot;0&quot; max=&quot;10&quot; value=&quot;4&quot; step=&quot;2&quot;&gt;
6889&lt;/p&gt;
6890</code></pre>
6891<p>&nbsp;3. Add one or more MDL classes, separated by spaces, to the slider using the <code>class</code> attribute.</p>
6892<pre><code class="language-markup">&lt;p style=&quot;width:300px&quot;&gt;
6893 &lt;input class=&quot;mdl-slider mdl-js-slider&quot; type=&quot;range&quot; id=&quot;s1&quot; min=&quot;0&quot; max=&quot;10&quot; value=&quot;4&quot; step=&quot;2&quot;&gt;
6894&lt;/p&gt;
6895</code></pre>
6896<p>The slider component is ready for use.</p>
6897<h4 id="example">Example</h4>
6898<p>A slider that controls volume.</p>
6899<pre><code class="language-markup">&lt;p style=&quot;width:300px&quot;&gt;
6900&lt;input class=&quot;mdl-slider mdl-js-slider&quot; type=&quot;range&quot; id=&quot;s1&quot; min=&quot;0&quot; max=&quot;10&quot; value=&quot;4&quot; step=&quot;2&quot;&gt;
6901&lt;/p&gt;
6902</code></pre>
6903<h2 id="configuration-options">Configuration options</h2>
6904<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the slider. The table below lists the available classes and their effects.</p>
6905<table>
6906<thead>
6907<tr>
6908<th>MDL class</th>
6909<th>Effect</th>
6910<th>Remarks</th>
6911</tr>
6912</thead>
6913<tbody>
6914<tr>
6915<td><code>mdl-slider</code></td>
6916<td>Defines input element as an MDL component</td>
6917<td>Required</td>
6918</tr>
6919<tr>
6920<td><code>mdl-js-slider</code></td>
6921<td>Assigns basic MDL behavior to input element</td>
6922<td>Required</td>
6923</tr>
6924</tbody>
6925</table>
6926<blockquote>
6927<p><strong>Note:</strong> A disabled version of the slider is provided, and is invoked with the standard HTML boolean attribute <code>disabled</code>. <code>&lt;input class=&quot;mdl-slider mdl-js-slider&quot; type=&quot;range&quot; id=&quot;s1&quot; min=&quot;0&quot; max=&quot;10&quot; value=&quot;4&quot; step=&quot;2&quot; disabled&gt;</code>
6928This attribute may be added or removed programmatically via scripting.</p>
6929<p><strong>Note:</strong> Although the <em>value</em> attribute is used to set a slider&#39;s initial value, it should not be used
6930to modify the value programmatically; instead, use the MDL <code>change()</code> method. For example, assuming
6931that <em>slider1</em> is a slider object and <em>newvalue</em> is a variable containing the desired value, do not
6932use <code>slider1.value = newvalue</code>; instead, use <code>slider1.MaterialSlider.change(newvalue)</code>.</p>
6933</blockquote>
6934<h2 id="license">License</h2>
6935<p>Copyright Google, 2015. Licensed under an Apache-2 license.</p>
6936
6937
6938
6939 </div>
6940
6941 </div>
6942 </section>
6943 <section id="snackbar-section" class="mdl-components__page mdl-grid">
6944 <div class="mdl-cell mdl-cell--12-col">
6945 <div class="docs-text-styling component-title">
6946 <h3>Snackbar</h3>
6947 <p>Transient popup notifications.</p>
6948 </div>
6949
6950
6951
6952
6953
6954
6955 <!-- Add warning, if the component has one -->
6956
6957 <!-- Generating snippets -->
6958
6959
6960
6961<div class="snippet-group">
6962
6963 <div class="snippet-header">
6964 <div class="snippet-demos">
6965 <div class="snippet-demo-padding"></div>
6966
6967
6968
6969
6970 <div class="snippet-demo">
6971 <div class="snippet-demo-container demo-snackbar demo-snackbar__snackbar">
6972 <button id="demo-show-snackbar" class="mdl-button mdl-js-button mdl-button--raised" type="button">Show Snackbar</button>
6973<div id="demo-snackbar-example" class="mdl-js-snackbar mdl-snackbar">
6974 <div class="mdl-snackbar__text"></div>
6975 <button class="mdl-snackbar__action" type="button"></button>
6976</div>
6977<script>
6978(function() {
6979 'use strict';
6980 var snackbarContainer = document.querySelector('#demo-snackbar-example');
6981 var showSnackbarButton = document.querySelector('#demo-show-snackbar');
6982 var handler = function(event) {
6983 showSnackbarButton.style.backgroundColor = '';
6984 };
6985 showSnackbarButton.addEventListener('click', function() {
6986 'use strict';
6987 showSnackbarButton.style.backgroundColor = '#' +
6988 Math.floor(Math.random() * 0xFFFFFF).toString(16);
6989 var data = {
6990 message: 'Button color changed.',
6991 timeout: 2000,
6992 actionHandler: handler,
6993 actionText: 'Undo'
6994 };
6995 snackbarContainer.MaterialSnackbar.showSnackbar(data);
6996 });
6997}());
6998</script>
6999
7000 </div>
7001 </div>
7002 <div class="snippet-demo-padding"></div>
7003 </div>
7004 <div class="snippet-captions">
7005 <div class="snippet-caption-padding"></div>
7006
7007 <div class="snippet-caption">
7008 Snackbar
7009 </div>
7010 <div class="snippet-caption-padding"></div>
7011 </div>
7012 </div>
7013 <div class="snippet-code">
7014 <pre class="language-markup codepen-button-enabled"><code id="snackbar/snackbar.html">&lt;button id=&quot;demo-show-snackbar&quot; class=&quot;mdl-button mdl-js-button mdl-button--raised&quot; type=&quot;button&quot;&gt;Show Snackbar&lt;/button&gt;
7015&lt;div id=&quot;demo-snackbar-example&quot; class=&quot;mdl-js-snackbar mdl-snackbar&quot;&gt;
7016 &lt;div class=&quot;mdl-snackbar__text&quot;&gt;&lt;/div&gt;
7017 &lt;button class=&quot;mdl-snackbar__action&quot; type=&quot;button&quot;&gt;&lt;/button&gt;
7018&lt;/div&gt;
7019&lt;script&gt;
7020(function() {
7021 &#39;use strict&#39;;
7022 var snackbarContainer = document.querySelector(&#39;#demo-snackbar-example&#39;);
7023 var showSnackbarButton = document.querySelector(&#39;#demo-show-snackbar&#39;);
7024 var handler = function(event) {
7025 showSnackbarButton.style.backgroundColor = &#39;&#39;;
7026 };
7027 showSnackbarButton.addEventListener(&#39;click&#39;, function() {
7028 &#39;use strict&#39;;
7029 showSnackbarButton.style.backgroundColor = &#39;#&#39; +
7030 Math.floor(Math.random() * 0xFFFFFF).toString(16);
7031 var data = {
7032 message: &#39;Button color changed.&#39;,
7033 timeout: 2000,
7034 actionHandler: handler,
7035 actionText: &#39;Undo&#39;
7036 };
7037 snackbarContainer.MaterialSnackbar.showSnackbar(data);
7038 });
7039}());
7040&lt;/script&gt;
7041</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
7042body {
7043 padding: 20px;
7044 background: #fafafa;
7045 position: relative;
7046}
7047&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
7048 </div>
7049</div>
7050
7051
7052
7053
7054<div class="snippet-group">
7055
7056 <div class="snippet-header">
7057 <div class="snippet-demos">
7058 <div class="snippet-demo-padding"></div>
7059
7060
7061
7062
7063 <div class="snippet-demo">
7064 <div class="snippet-demo-container demo-snackbar demo-snackbar__toast">
7065 <button id="demo-show-toast" class="mdl-button mdl-js-button mdl-button--raised" type="button">Show Toast</button>
7066<div id="demo-toast-example" class="mdl-js-snackbar mdl-snackbar">
7067 <div class="mdl-snackbar__text"></div>
7068 <button class="mdl-snackbar__action" type="button"></button>
7069</div>
7070<script>
7071(function() {
7072 'use strict';
7073 window['counter'] = 0;
7074 var snackbarContainer = document.querySelector('#demo-toast-example');
7075 var showToastButton = document.querySelector('#demo-show-toast');
7076 showToastButton.addEventListener('click', function() {
7077 'use strict';
7078 var data = {message: 'Example Message # ' + ++counter};
7079 snackbarContainer.MaterialSnackbar.showSnackbar(data);
7080 });
7081}());
7082</script>
7083
7084 </div>
7085 </div>
7086 <div class="snippet-demo-padding"></div>
7087 </div>
7088 <div class="snippet-captions">
7089 <div class="snippet-caption-padding"></div>
7090
7091 <div class="snippet-caption">
7092 Toast
7093 </div>
7094 <div class="snippet-caption-padding"></div>
7095 </div>
7096 </div>
7097 <div class="snippet-code">
7098 <pre class="language-markup codepen-button-enabled"><code id="snackbar/toast.html">&lt;button id=&quot;demo-show-toast&quot; class=&quot;mdl-button mdl-js-button mdl-button--raised&quot; type=&quot;button&quot;&gt;Show Toast&lt;/button&gt;
7099&lt;div id=&quot;demo-toast-example&quot; class=&quot;mdl-js-snackbar mdl-snackbar&quot;&gt;
7100 &lt;div class=&quot;mdl-snackbar__text&quot;&gt;&lt;/div&gt;
7101 &lt;button class=&quot;mdl-snackbar__action&quot; type=&quot;button&quot;&gt;&lt;/button&gt;
7102&lt;/div&gt;
7103&lt;script&gt;
7104(function() {
7105 &#39;use strict&#39;;
7106 window[&#39;counter&#39;] = 0;
7107 var snackbarContainer = document.querySelector(&#39;#demo-toast-example&#39;);
7108 var showToastButton = document.querySelector(&#39;#demo-show-toast&#39;);
7109 showToastButton.addEventListener(&#39;click&#39;, function() {
7110 &#39;use strict&#39;;
7111 var data = {message: &#39;Example Message # &#39; + ++counter};
7112 snackbarContainer.MaterialSnackbar.showSnackbar(data);
7113 });
7114}());
7115&lt;/script&gt;
7116</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
7117body {
7118 padding: 20px;
7119 background: #fafafa;
7120 position: relative;
7121}
7122&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
7123 </div>
7124</div>
7125
7126
7127 <!-- Adding the demo page -->
7128
7129 <style>
7130
7131 </style>
7132
7133 <script>
7134
7135 </script>
7136
7137
7138 <div class="docs-text-styling docs-readme">
7139
7140
7141
7142
7143<h2 id="introduction">Introduction</h2>
7144<p>The Material Design Lite (MDL) <strong>snackbar</strong> component is a container used to notify a user of an operation&#39;s status.
7145It displays at the bottom of the screen.
7146A snackbar may contain an action button to execute a command for the user.
7147Actions should undo the committed action or retry it if it failed for example.
7148Actions should not be to close the snackbar.
7149By not providing an action, the snackbar becomes a <strong>toast</strong> component.</p>
7150<h2 id="basic-usage-">Basic Usage:</h2>
7151<p>Start a snackbar with a container div element.
7152On that container define the <code>mdl-js-snackbar</code> and <code>mdl-snackbar</code> classes.
7153It is also beneficial to add the aria live and atomic values to this container.</p>
7154<p>Within the container create a container element for the message.
7155This element should have the class <code>mdl-snackbar__text</code>.
7156Leave this element empty!
7157Text is added when the snackbar is called to be shown.</p>
7158<p>Second in the container, add a button element.
7159This element should have the class <code>mdl-snackbar__action</code>.
7160It is recommended to set the type to button to make sure no forms get submitted by accident.
7161Leave the text content empty here as well!
7162Do not directly apply any event handlers.</p>
7163<p>You now have complete markup for the snackbar to function.
7164All that is left is within your JavaScript to call the <code>showSnackbar</code> method on the snackbar container.
7165This takes a <a href="#data-object">plain object</a> to configure the snackbar content appropriately.
7166You may call it multiple consecutive times and messages will stack.</p>
7167<h2 id="examples">Examples</h2>
7168<p>All snackbars should be shown through the same element.</p>
7169<h4 id="markup-">Markup:</h4>
7170<pre><code class="language-markup">&lt;div aria-live=&quot;assertive&quot; aria-atomic=&quot;true&quot; aria-relevant=&quot;text&quot; class=&quot;mdl-snackbar mdl-js-snackbar&quot;&gt;
7171 &lt;div class=&quot;mdl-snackbar__text&quot;&gt;&lt;/div&gt;
7172 &lt;button type=&quot;button&quot; class=&quot;mdl-snackbar__action&quot;&gt;&lt;/button&gt;
7173&lt;/div&gt;
7174</code></pre>
7175<blockquote>
7176<p>Note: In this example there are a few aria attributes for accessibility. Please modify these as-needed for your site.</p>
7177</blockquote>
7178<h3 id="snackbar">Snackbar</h3>
7179<pre><code class="language-javascript">var notification = document.querySelector(&#39;.mdl-js-snackbar&#39;);
7180var data = {
7181 message: &#39;Message Sent&#39;,
7182 actionHandler: function(event) {},
7183 actionText: &#39;Undo&#39;,
7184 timeout: 10000
7185};
7186notification.MaterialSnackbar.showSnackbar(data);
7187</code></pre>
7188<h3 id="toast">Toast</h3>
7189<pre><code class="language-javascript">var notification = document.querySelector(&#39;.mdl-js-snackbar&#39;);
7190notification.MaterialSnackbar.showSnackbar(
7191 {
7192 message: &#39;Image Uploaded&#39;
7193 }
7194);
7195</code></pre>
7196<h2 id="css-classes">CSS Classes</h2>
7197<h3 id="blocks">Blocks</h3>
7198<table>
7199<thead>
7200<tr>
7201<th>MDL Class</th>
7202<th>Effect</th>
7203<th>Remarks</th>
7204</tr>
7205</thead>
7206<tbody>
7207<tr>
7208<td><code>mdl-snackbar</code></td>
7209<td>Defines the container of the snackbar component.</td>
7210<td>Required on snackbar container</td>
7211</tr>
7212</tbody>
7213</table>
7214<h3 id="elements">Elements</h3>
7215<table>
7216<thead>
7217<tr>
7218<th>MDL Class</th>
7219<th>Effect</th>
7220<th>Remarks</th>
7221</tr>
7222</thead>
7223<tbody>
7224<tr>
7225<td><code>mdl-snackbar__text</code></td>
7226<td>Defines the element containing the text of the snackbar.</td>
7227<td>Required</td>
7228</tr>
7229<tr>
7230<td><code>mdl-snackbar__action</code></td>
7231<td>Defines the element that triggers the action of a snackbar.</td>
7232<td>Required</td>
7233</tr>
7234</tbody>
7235</table>
7236<h3 id="modifiers">Modifiers</h3>
7237<table>
7238<thead>
7239<tr>
7240<th>MDL Class</th>
7241<th>Effect</th>
7242<th>Remarks</th>
7243</tr>
7244</thead>
7245<tbody>
7246<tr>
7247<td><code>mdl-snackbar--active</code></td>
7248<td>Marks the snackbar as active which causes it to display.</td>
7249<td>Required when active. Controlled in JavaScript</td>
7250</tr>
7251</tbody>
7252</table>
7253<h2 id="data-object">Data Object</h2>
7254<p>The Snackbar components <code>showSnackbar</code> method takes an object for snackbar data.
7255The table below shows the properties and their usage.</p>
7256<table>
7257<thead>
7258<tr>
7259<th>Property</th>
7260<th>Effect</th>
7261<th>Remarks</th>
7262<th>Type</th>
7263</tr>
7264</thead>
7265<tbody>
7266<tr>
7267<td>message</td>
7268<td>The text message to display.</td>
7269<td>Required</td>
7270<td>String</td>
7271</tr>
7272<tr>
7273<td>timeout</td>
7274<td>The amount of time in milliseconds to show the snackbar.</td>
7275<td>Optional (default 2750)</td>
7276<td>Integer</td>
7277</tr>
7278<tr>
7279<td>actionHandler</td>
7280<td>The function to execute when the action is clicked.</td>
7281<td>Optional</td>
7282<td>Function</td>
7283</tr>
7284<tr>
7285<td>actionText</td>
7286<td>The text to display for the action button.</td>
7287<td>Required if actionHandler is set</td>
7288<td>String.</td>
7289</tr>
7290</tbody>
7291</table>
7292
7293
7294
7295 </div>
7296
7297 </div>
7298 </section>
7299 <section id="toggles-section" class="mdl-components__page mdl-grid">
7300 <div class="mdl-cell mdl-cell--12-col">
7301 <div class="docs-text-styling component-title">
7302 <h3>Toggles</h3>
7303 <p>Choose between states.</p>
7304 </div>
7305
7306
7307 <section class="docs-toc docs-text-styling">
7308 <nav class="section-content">
7309 <ul>
7310
7311 <li><a href="#toggles-section/checkbox">Checkbox</a></li>
7312
7313 <li><a href="#toggles-section/radio">Radio button</a></li>
7314
7315 <li><a href="#toggles-section/icon-toggle">Icon toggle</a></li>
7316
7317 <li><a href="#toggles-section/switch">Switch</a></li>
7318
7319 </ul>
7320 </nav>
7321 </section>
7322
7323
7324
7325
7326
7327 <span class="docs-text-styling">
7328 <h1 class="mdl-components__classname" id="toggles-section/checkbox">Checkbox</h1>
7329 </span>
7330
7331 <!-- Add warning, if the component has one -->
7332
7333 <!-- Generating snippets -->
7334
7335
7336
7337<div class="snippet-group">
7338
7339 <div class="snippet-header">
7340 <div class="snippet-demos">
7341 <div class="snippet-demo-padding"></div>
7342
7343
7344
7345
7346 <div class="snippet-demo">
7347 <div class="snippet-demo-container demo-checkbox demo-checkbox__check-on">
7348 <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-1">
7349 <input type="checkbox" id="checkbox-1" class="mdl-checkbox__input" checked>
7350 <span class="mdl-checkbox__label">Checkbox</span>
7351</label>
7352
7353 </div>
7354 </div>
7355
7356
7357
7358 <div class="snippet-demo">
7359 <div class="snippet-demo-container demo-checkbox demo-checkbox__check-off">
7360 <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-2">
7361 <input type="checkbox" id="checkbox-2" class="mdl-checkbox__input">
7362 <span class="mdl-checkbox__label">Checkbox</span>
7363</label>
7364
7365 </div>
7366 </div>
7367 <div class="snippet-demo-padding"></div>
7368 </div>
7369 <div class="snippet-captions">
7370 <div class="snippet-caption-padding"></div>
7371
7372 <div class="snippet-caption">
7373 Check on
7374 </div>
7375 <div class="snippet-caption">
7376 Check off
7377 </div>
7378 <div class="snippet-caption-padding"></div>
7379 </div>
7380 </div>
7381 <div class="snippet-code">
7382 <pre class="language-markup codepen-button-enabled"><code id="checkbox/check-on.html">&lt;label class=&quot;mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect&quot; for=&quot;checkbox-1&quot;&gt;
7383 &lt;input type=&quot;checkbox&quot; id=&quot;checkbox-1&quot; class=&quot;mdl-checkbox__input&quot; checked&gt;
7384 &lt;span class=&quot;mdl-checkbox__label&quot;&gt;Checkbox&lt;/span&gt;
7385&lt;/label&gt;
7386</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="checkbox/check-off.html">&lt;label class=&quot;mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect&quot; for=&quot;checkbox-2&quot;&gt;
7387 &lt;input type=&quot;checkbox&quot; id=&quot;checkbox-2&quot; class=&quot;mdl-checkbox__input&quot;&gt;
7388 &lt;span class=&quot;mdl-checkbox__label&quot;&gt;Checkbox&lt;/span&gt;
7389&lt;/label&gt;
7390</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
7391body {
7392 padding: 20px;
7393 background: #fafafa;
7394 position: relative;
7395}
7396&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
7397 </div>
7398</div>
7399
7400
7401 <!-- Adding the demo page -->
7402
7403 <style>
7404
7405 </style>
7406
7407 <script>
7408
7409 </script>
7410
7411
7412 <div class="docs-text-styling docs-readme">
7413
7414
7415
7416
7417<h2 id="introduction">Introduction</h2>
7418<p>The Material Design Lite (MDL) <strong>checkbox</strong> component is an enhanced version of the standard HTML <code>&lt;input type=&quot;checkbox&quot;&gt;</code> element. A checkbox consists of a small square and, typically, text that clearly communicates a binary condition that will be set or unset when the user clicks or touches it. Checkboxes typically, but not necessarily, appear in groups, and can be selected and deselected individually. The MDL checkbox component allows you to add display and click effects.</p>
7419<p>Checkboxes are a common feature of most user interfaces, regardless of a site&#39;s content or function. Their design and use is therefore an important factor in the overall user experience. See the checkbox component&#39;s <a href="https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox">Material Design specifications page</a> for details.</p>
7420<p>The enhanced checkbox component has a more vivid visual look than a standard checkbox, and may be initially or programmatically <em>disabled</em>.</p>
7421<h3 id="to-include-an-mdl-checkbox-component-">To include an MDL <strong>checkbox</strong> component:</h3>
7422<p>&nbsp;1. Code a <code>&lt;label&gt;</code> element and give it a <code>for</code> attribute whose value is the unique id of the checkbox it will contain. The <code>for</code> attribute is optional when the <code>&lt;input&gt;</code> element is contained inside the <code>&lt;label&gt;</code> element, but is recommended for clarity.</p>
7423<pre><code class="language-markup">&lt;label for=&quot;chkbox1&quot;&gt;
7424...
7425&lt;/label&gt;
7426</code></pre>
7427<p>&nbsp;2. Inside the label, code an <code>&lt;input&gt;</code> element and give it a <code>type</code> attribute whose value is <code>&quot;checkbox&quot;</code>. Also give it an <code>id</code> attribute whose value matches the label&#39;s <code>for</code> attribute value.</p>
7428<pre><code class="language-markup">&lt;label for=&quot;chkbox1&quot;&gt;
7429 &lt;input type=&quot;checkbox&quot; id=&quot;chkbox1&quot;&gt;
7430&lt;/label&gt;
7431</code></pre>
7432<p>&nbsp;3. Also inside the label, after the checkbox, code a <code>&lt;span&gt;</code> element containing the checkbox&#39;s text caption.</p>
7433<pre><code class="language-markup">&lt;label for=&quot;chkbox1&quot;&gt;
7434 &lt;input type=&quot;checkbox&quot; id=&quot;chkbox1&quot;&gt;
7435 &lt;span&gt;Enable AutoSave&lt;/span&gt;
7436&lt;/label&gt;
7437</code></pre>
7438<p>&nbsp;4. Add one or more MDL classes, separated by spaces, to the label, checkbox, and caption using the <code>class</code> attribute.</p>
7439<pre><code class="language-markup">&lt;label for=&quot;chkbox1&quot; class=&quot;mdl-checkbox mdl-js-checkbox&quot;&gt;
7440 &lt;input type=&quot;checkbox&quot; id=&quot;chkbox1&quot; class=&quot;mdl-checkbox__input&quot;&gt;
7441 &lt;span class=&quot;mdl-checkbox__label&quot;&gt;Enable AutoSave&lt;/span&gt;
7442&lt;/label&gt;
7443</code></pre>
7444<p>The checkbox component is ready for use.</p>
7445<h4 id="example">Example</h4>
7446<p>A checkbox with a ripple click effect.</p>
7447<pre><code class="language-markup">&lt;label for=&quot;chkbox1&quot; class=&quot;mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect&quot;&gt;
7448 &lt;input type=&quot;checkbox&quot; id=&quot;chkbox1&quot; class=&quot;mdl-checkbox__input&quot;&gt;
7449 &lt;span class=&quot;mdl-checkbox__label&quot;&gt;Enable AutoSave&lt;/span&gt;
7450&lt;/label&gt;
7451</code></pre>
7452<h2 id="configuration-options">Configuration options</h2>
7453<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the checkbox. The table below lists the available classes and their effects.</p>
7454<table>
7455<thead>
7456<tr>
7457<th>MDL class</th>
7458<th>Effect</th>
7459<th>Remarks</th>
7460</tr>
7461</thead>
7462<tbody>
7463<tr>
7464<td><code>mdl-checkbox</code></td>
7465<td>Defines label as an MDL component</td>
7466<td>Required on label element</td>
7467</tr>
7468<tr>
7469<td><code>mdl-js-checkbox</code></td>
7470<td>Assigns basic MDL behavior to label</td>
7471<td>Required on label element</td>
7472</tr>
7473<tr>
7474<td><code>mdl-checkbox__input</code></td>
7475<td>Applies basic MDL behavior to checkbox</td>
7476<td>Required on input element (checkbox)</td>
7477</tr>
7478<tr>
7479<td><code>mdl-checkbox__label</code></td>
7480<td>Applies basic MDL behavior to caption</td>
7481<td>Required on span element (caption)</td>
7482</tr>
7483<tr>
7484<td><code>mdl-js-ripple-effect</code></td>
7485<td>Applies <em>ripple</em> click effect</td>
7486<td>Optional; goes on label element, not input element (checkbox)</td>
7487</tr>
7488</tbody>
7489</table>
7490<blockquote>
7491<p><strong>Note:</strong> Disabled versions of all the available checkbox types are provided, and are invoked with the standard HTML boolean attribute <code>disabled</code>. <code>&lt;input type=&quot;checkbox&quot; id=&quot;checkbox-5&quot; class=&quot;mdl-checkbox__input&quot; disabled&gt;</code>
7492This attribute may be added or removed programmatically via scripting.</p>
7493</blockquote>
7494
7495
7496
7497 </div>
7498
7499
7500
7501 <span class="docs-text-styling">
7502 <h1 class="mdl-components__classname" id="toggles-section/radio">Radio button</h1>
7503 </span>
7504
7505 <!-- Add warning, if the component has one -->
7506
7507 <!-- Generating snippets -->
7508
7509
7510
7511<div class="snippet-group">
7512
7513 <div class="snippet-header">
7514 <div class="snippet-demos">
7515 <div class="snippet-demo-padding"></div>
7516
7517
7518
7519
7520 <div class="snippet-demo">
7521 <div class="snippet-demo-container demo-radio demo-radio__radio-on">
7522 <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="option-1">
7523 <input type="radio" id="option-1" class="mdl-radio__button" name="options" value="1" checked>
7524 <span class="mdl-radio__label">First</span>
7525</label>
7526
7527 </div>
7528 </div>
7529
7530
7531
7532 <div class="snippet-demo">
7533 <div class="snippet-demo-container demo-radio demo-radio__radio-off">
7534 <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="option-2">
7535 <input type="radio" id="option-2" class="mdl-radio__button" name="options" value="2">
7536 <span class="mdl-radio__label">Second</span>
7537</label>
7538
7539 </div>
7540 </div>
7541 <div class="snippet-demo-padding"></div>
7542 </div>
7543 <div class="snippet-captions">
7544 <div class="snippet-caption-padding"></div>
7545
7546 <div class="snippet-caption">
7547 Radio on
7548 </div>
7549 <div class="snippet-caption">
7550 Radio off
7551 </div>
7552 <div class="snippet-caption-padding"></div>
7553 </div>
7554 </div>
7555 <div class="snippet-code">
7556 <pre class="language-markup codepen-button-enabled"><code id="radio/radio-on.html">&lt;label class=&quot;mdl-radio mdl-js-radio mdl-js-ripple-effect&quot; for=&quot;option-1&quot;&gt;
7557 &lt;input type=&quot;radio&quot; id=&quot;option-1&quot; class=&quot;mdl-radio__button&quot; name=&quot;options&quot; value=&quot;1&quot; checked&gt;
7558 &lt;span class=&quot;mdl-radio__label&quot;&gt;First&lt;/span&gt;
7559&lt;/label&gt;
7560</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="radio/radio-off.html">&lt;label class=&quot;mdl-radio mdl-js-radio mdl-js-ripple-effect&quot; for=&quot;option-2&quot;&gt;
7561 &lt;input type=&quot;radio&quot; id=&quot;option-2&quot; class=&quot;mdl-radio__button&quot; name=&quot;options&quot; value=&quot;2&quot;&gt;
7562 &lt;span class=&quot;mdl-radio__label&quot;&gt;Second&lt;/span&gt;
7563&lt;/label&gt;
7564</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
7565body {
7566 padding: 20px;
7567 background: #fafafa;
7568 position: relative;
7569}
7570&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
7571 </div>
7572</div>
7573
7574
7575 <!-- Adding the demo page -->
7576
7577 <style>
7578
7579 </style>
7580
7581 <script>
7582
7583 </script>
7584
7585
7586 <div class="docs-text-styling docs-readme">
7587
7588
7589
7590
7591<h2 id="introduction">Introduction</h2>
7592<p>The Material Design Lite (MDL) <strong>radio</strong> component is an enhanced version of the standard HTML <code>&lt;input type=&quot;radio&quot;&gt;</code>, or &quot;radio button&quot; element. A radio button consists of a small circle and, typically, text that clearly communicates a condition that will be set when the user clicks or touches it. Radio buttons always appear in groups of two or more and, while they can be individually selected, can only be deselected by selecting a different radio button in the same group (which deselects all other radio buttons in the group). The MDL radio component allows you to add display and click effects.</p>
7593<p>Radio buttons are a common feature of most user interfaces, regardless of a site&#39;s content or function. Their design and use is therefore an important factor in the overall user experience. See the radio component&#39;s <a href="https://www.google.com/design/spec/components/selection-controls.html#selection-controls-radio-button">Material Design specifications page</a> for details.</p>
7594<p>The enhanced radio component has a more vivid visual look than a standard radio button, and may be initially or programmatically <em>disabled</em>.</p>
7595<h3 id="to-include-an-mdl-radio-component-">To include an MDL <strong>radio</strong> component:</h3>
7596<p>&nbsp;1. Code a <code>&lt;label&gt;</code> element and give it a <code>for</code> attribute whose value is the unique id of the radio button it will contain. The <code>for</code> attribute is optional when the <code>&lt;input&gt;</code> element is contained inside the <code>&lt;label&gt;</code> element, but is recommended for clarity.</p>
7597<pre><code class="language-markup">&lt;label for=&quot;radio1&quot;&gt;
7598...
7599&lt;/label&gt;
7600</code></pre>
7601<p>&nbsp;2. Inside the label, code an <code>&lt;input&gt;</code> element and give it a <code>type</code> attribute whose value is <code>&quot;radio&quot;</code>. Also give it an <code>id</code> attribute whose value matches the label&#39;s <code>for</code> attribute value, and a <code>name</code> attribute whose value identifies the radio button group. Optionally, give it a <code>value</code> attribute whose value provides some information about the radio button for scripting purposes.</p>
7602<pre><code class="language-markup">&lt;label for=&quot;radio1&quot;&gt;
7603 &lt;input type=&quot;radio&quot; id=&quot;radio1&quot; name=&quot;flash&quot; value=&quot;on&quot;&gt;
7604&lt;/label&gt;
7605</code></pre>
7606<p>&nbsp;3. Also inside the label, after the radio button, code a <code>&lt;span&gt;</code> element containing the radio button&#39;s text caption.</p>
7607<pre><code class="language-markup">&lt;label for=&quot;radio1&quot;&gt;
7608 &lt;input type=&quot;radio&quot; id=&quot;radio1&quot; name=&quot;flash&quot; value=&quot;on&quot;&gt;
7609 &lt;span&gt;Always on&lt;/span&gt;
7610&lt;/label&gt;
7611</code></pre>
7612<p>&nbsp;4. Add one or more MDL classes, separated by spaces, to the label, checkbox, and caption using the <code>class</code> attribute.</p>
7613<pre><code class="language-markup">&lt;label for=&quot;radio1&quot; class=&quot;mdl-radio mdl-js-radio&quot;&gt;
7614 &lt;input type=&quot;radio&quot; id=&quot;radio1&quot; name=&quot;flash&quot; value=&quot;on&quot; class=&quot;mdl-radio__button&quot;&gt;
7615 &lt;span class=&quot;mdl-radio__label&quot;&gt;Always on&lt;/span&gt;
7616&lt;/label&gt;
7617</code></pre>
7618<p>&nbsp;5. Repeat steps 1 through 4 for the other radio components in the group. For each one:</p>
7619<ul>
7620<li>on the <code>label</code> element, specify a unique <code>for</code> attribute value</li>
7621<li>on the <code>input</code> element, specify an <code>id</code> attribute value that matches its <code>label</code> element&#39;s <code>for</code> attribute value</li>
7622<li>on the <code>input</code> element, specify the same <code>name</code> attribute value for all radio components in the group</li>
7623<li>optionally, on the <code>input</code> element, specify a unique <code>value</code> attribute value</li>
7624</ul>
7625<p>The radio components are ready for use.</p>
7626<h4 id="example">Example</h4>
7627<p>A group of radio buttons to control a camera&#39;s flash setting.</p>
7628<pre><code class="language-markup">&lt;label class=&quot;mdl-radio mdl-js-radio mdl-js-ripple-effect&quot; for=&quot;flash1&quot;&gt;
7629 &lt;input checked class=&quot;mdl-radio__button&quot; id=&quot;flash1&quot; name=&quot;flash&quot; type=&quot;radio&quot;
7630 value=&quot;on&quot;&gt;
7631 &lt;span class=&quot;mdl-radio__label&quot;&gt;Always on&lt;/span&gt;
7632&lt;/label&gt;
7633&lt;label class=&quot;mdl-radio mdl-js-radio mdl-js-ripple-effect&quot; for=&quot;flash2&quot;&gt;
7634 &lt;input class=&quot;mdl-radio__button&quot; id=&quot;flash2&quot; name=&quot;flash&quot; type=&quot;radio&quot; value=&quot;off&quot;&gt;
7635 &lt;span class=&quot;mdl-radio__label&quot;&gt;Always off&lt;/span&gt;
7636&lt;/label&gt;
7637&lt;label class=&quot;mdl-radio mdl-js-radio mdl-js-ripple-effect&quot; for=&quot;flash3&quot;&gt;
7638 &lt;input class=&quot;mdl-radio__button&quot; id=&quot;flash3&quot; name=&quot;flash&quot; type=&quot;radio&quot; value=&quot;auto&quot;&gt;
7639 &lt;span class=&quot;mdl-radio__label&quot;&gt;Automatic&lt;/span&gt;
7640&lt;/label&gt;
7641</code></pre>
7642<h2 id="configuration-options">Configuration options</h2>
7643<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the radio button. The table below lists the available classes and their effects.</p>
7644<table>
7645<thead>
7646<tr>
7647<th>MDL class</th>
7648<th>Effect</th>
7649<th>Remarks</th>
7650</tr>
7651</thead>
7652<tbody>
7653<tr>
7654<td><code>mdl-radio</code></td>
7655<td>Defines label as an MDL component</td>
7656<td>Required on label element</td>
7657</tr>
7658<tr>
7659<td><code>mdl-js-radio</code></td>
7660<td>Assigns basic MDL behavior to label</td>
7661<td>Required on label element</td>
7662</tr>
7663<tr>
7664<td><code>mdl-radio__button</code></td>
7665<td>Applies basic MDL behavior to radio</td>
7666<td>Required on input element (radio button)</td>
7667</tr>
7668<tr>
7669<td><code>mdl-radio__label</code></td>
7670<td>Applies basic MDL behavior to caption</td>
7671<td>Required on span element (caption)</td>
7672</tr>
7673<tr>
7674<td><code>mdl-js-ripple-effect</code></td>
7675<td>Applies <em>ripple</em> click effect</td>
7676<td>Optional; goes on label element, not input element (radio button)</td>
7677</tr>
7678</tbody>
7679</table>
7680<blockquote>
7681<p><strong>Note:</strong> Disabled versions of all the available radio button types are provided, and are invoked with the standard HTML boolean attribute <code>disabled</code>. <code>&lt;input type=&quot;radio&quot; id=&quot;radio5&quot; name=&quot;flash&quot; class=&quot;mdl-radio__button&quot; disabled&gt;</code>
7682This attribute may be added or removed programmatically via scripting.</p>
7683</blockquote>
7684
7685
7686
7687 </div>
7688
7689
7690
7691 <span class="docs-text-styling">
7692 <h1 class="mdl-components__classname" id="toggles-section/icon-toggle">Icon toggle</h1>
7693 </span>
7694
7695 <!-- Add warning, if the component has one -->
7696
7697 <!-- Generating snippets -->
7698
7699
7700
7701<div class="snippet-group">
7702
7703 <div class="snippet-header">
7704 <div class="snippet-demos">
7705 <div class="snippet-demo-padding"></div>
7706
7707
7708
7709
7710 <div class="snippet-demo">
7711 <div class="snippet-demo-container demo-icon-toggle demo-icon-toggle__icon-on">
7712 <label class="mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect" for="icon-toggle-1">
7713 <input type="checkbox" id="icon-toggle-1" class="mdl-icon-toggle__input" checked>
7714 <i class="mdl-icon-toggle__label material-icons">format_bold</i>
7715</label>
7716
7717 </div>
7718 </div>
7719
7720
7721
7722 <div class="snippet-demo">
7723 <div class="snippet-demo-container demo-icon-toggle demo-icon-toggle__icon-off">
7724 <label class="mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect" for="icon-toggle-2">
7725 <input type="checkbox" id="icon-toggle-2" class="mdl-icon-toggle__input">
7726 <i class="mdl-icon-toggle__label material-icons">format_italic</i>
7727</label>
7728
7729 </div>
7730 </div>
7731 <div class="snippet-demo-padding"></div>
7732 </div>
7733 <div class="snippet-captions">
7734 <div class="snippet-caption-padding"></div>
7735
7736 <div class="snippet-caption">
7737 Icon on
7738 </div>
7739 <div class="snippet-caption">
7740 Icon off
7741 </div>
7742 <div class="snippet-caption-padding"></div>
7743 </div>
7744 </div>
7745 <div class="snippet-code">
7746 <pre class="language-markup codepen-button-enabled"><code id="icon-toggle/icon-on.html">&lt;label class=&quot;mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect&quot; for=&quot;icon-toggle-1&quot;&gt;
7747 &lt;input type=&quot;checkbox&quot; id=&quot;icon-toggle-1&quot; class=&quot;mdl-icon-toggle__input&quot; checked&gt;
7748 &lt;i class=&quot;mdl-icon-toggle__label material-icons&quot;&gt;format_bold&lt;/i&gt;
7749&lt;/label&gt;
7750</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="icon-toggle/icon-off.html">&lt;label class=&quot;mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect&quot; for=&quot;icon-toggle-2&quot;&gt;
7751 &lt;input type=&quot;checkbox&quot; id=&quot;icon-toggle-2&quot; class=&quot;mdl-icon-toggle__input&quot;&gt;
7752 &lt;i class=&quot;mdl-icon-toggle__label material-icons&quot;&gt;format_italic&lt;/i&gt;
7753&lt;/label&gt;
7754</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
7755body {
7756 padding: 20px;
7757 background: #fafafa;
7758 position: relative;
7759}
7760&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
7761 </div>
7762</div>
7763
7764
7765 <!-- Adding the demo page -->
7766
7767 <style>
7768
7769 </style>
7770
7771 <script>
7772
7773 </script>
7774
7775
7776 <div class="docs-text-styling docs-readme">
7777
7778
7779
7780
7781<h2 id="introduction">Introduction</h2>
7782<p>The Material Design Lite (MDL) <strong>icon-toggle</strong> component is an enhanced version of the standard HTML <code>&lt;input type=&quot;checkbox&quot;&gt;</code> element. An icon-toggle consists of a user defined icon that indicates, by visual highlighting, a binary condition that will be set or unset when the user clicks or touches it. Like checkboxes, icon-toggles may appear individually or in groups, and can be selected and deselected individually.</p>
7783<p>Icon toggles, particularly as a replacement for certain checkboxes, can be a valuable feature in user interfaces, regardless of a site&#39;s content or function. Their design and use is therefore an important factor in the overall user experience. See the icon-toggle component&#39;s <a href="http://www.google.com/design/spec/components/buttons.html#buttons-other-buttons">Material Design specifications page</a> for details.</p>
7784<p>The icon-toggle component can have a more customized visual look than a standard checkbox, and may be initially or programmatically <em>disabled</em>.</p>
7785<h3 id="to-include-an-mdl-icon-toggle-component-">To include an MDL <strong>icon-toggle</strong> component:</h3>
7786<p>&nbsp;1. Code a <code>&lt;label&gt;</code> element and give it a <code>for</code> attribute whose value is the unique id of the icon-toggle it will contain.</p>
7787<pre><code class="language-markup">&lt;label for=&quot;icon-toggle-1&quot;&gt;
7788...
7789&lt;/label&gt;
7790</code></pre>
7791<p>&nbsp;2. Inside the label, code an <code>&lt;input&gt;</code> element and give it a <code>type</code> attribute whose value is <code>&quot;checkbox&quot;</code>. Also give it an <code>id</code> attribute whose value matches the label&#39;s <code>for</code> attribute value.</p>
7792<pre><code class="language-markup">&lt;label for=&quot;icon-toggle-1&quot;&gt;
7793 &lt;input type=&quot;checkbox&quot; id=&quot;icon-toggle-1&quot;&gt;
7794&lt;/label&gt;
7795</code></pre>
7796<p>&nbsp;3. Also inside the label, after the input element, code an <code>&lt;i&gt;</code> element containing the icon-toggle&#39;s desired icon.</p>
7797<pre><code class="language-markup">&lt;label for=&quot;icon-toggle-1&quot;&gt;
7798 &lt;input type=&quot;checkbox&quot; id=&quot;icon-toggle-1&quot;&gt;
7799 &lt;i class=&quot;mdl-icon-toggle__label material-icons&quot;&gt;format_bold&lt;/i&gt;
7800&lt;/label&gt;
7801</code></pre>
7802<p>&nbsp;4. Add one or more MDL classes, separated by spaces, to the label and input elements, using the <code>class</code> attribute.</p>
7803<pre><code class="language-markup">&lt;label class=&quot;mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect&quot; for=&quot;icon-toggle-1&quot;&gt;
7804 &lt;input type=&quot;checkbox&quot; id=&quot;icon-toggle-1&quot; class=&quot;mdl-icon-toggle__input&quot;&gt;
7805 &lt;i class=&quot;mdl-icon-toggle__label material-icons&quot;&gt;format_bold&lt;/i&gt;
7806&lt;/label&gt;
7807</code></pre>
7808<p>The icon-toggle component is ready for use.</p>
7809<h4 id="example">Example</h4>
7810<p>An icon-toggle with a ripple click effect.</p>
7811<pre><code class="language-markup">&lt;label class=&quot;mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect&quot; for=&quot;icon-toggle-1&quot;&gt;
7812 &lt;input type=&quot;checkbox&quot; id=&quot;icon-toggle-1&quot; class=&quot;mdl-icon-toggle__input&quot;&gt;
7813 &lt;i class=&quot;mdl-icon-toggle__label material-icons&quot;&gt;format_bold&lt;/i&gt;
7814&lt;/label&gt;
7815</code></pre>
7816<h2 id="configuration-options">Configuration options</h2>
7817<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the icon-toggle. The table below lists the available classes and their effects.</p>
7818<table>
7819<thead>
7820<tr>
7821<th>MDL class</th>
7822<th>Effect</th>
7823<th>Remarks</th>
7824</tr>
7825</thead>
7826<tbody>
7827<tr>
7828<td><code>mdl-icon-toggle</code></td>
7829<td>Defines label as an MDL component</td>
7830<td>Required on label element</td>
7831</tr>
7832<tr>
7833<td><code>mdl-js-icon-toggle</code></td>
7834<td>Assigns basic MDL behavior to label</td>
7835<td>Required on label element</td>
7836</tr>
7837<tr>
7838<td><code>mdl-icon-toggle__input</code></td>
7839<td>Applies basic MDL behavior to icon-toggle</td>
7840<td>Required on input element (icon-toggle)</td>
7841</tr>
7842<tr>
7843<td><code>mdl-icon-toggle__label</code></td>
7844<td>Applies basic MDL behavior to caption</td>
7845<td>Required on i element (icon)</td>
7846</tr>
7847<tr>
7848<td><code>mdl-js-ripple-effect</code></td>
7849<td>Applies <em>ripple</em> click effect</td>
7850<td>Optional; goes on label element, not input element (icon-toggle)</td>
7851</tr>
7852</tbody>
7853</table>
7854<blockquote>
7855<p><strong>Note:</strong> Disabled versions of all available input types are provided, and are invoked with the standard HTML boolean attribute <code>disabled</code>. <code>&lt;input type=&quot;checkbox&quot; id=&quot;icon-toggle-5&quot; class=&quot;mdl-icon-toggle__input&quot; disabled&gt;</code>
7856This attribute may be added or removed programmatically via scripting.</p>
7857</blockquote>
7858
7859
7860
7861 </div>
7862
7863
7864
7865 <span class="docs-text-styling">
7866 <h1 class="mdl-components__classname" id="toggles-section/switch">Switch</h1>
7867 </span>
7868
7869 <!-- Add warning, if the component has one -->
7870
7871 <!-- Generating snippets -->
7872
7873
7874
7875<div class="snippet-group">
7876
7877 <div class="snippet-header">
7878 <div class="snippet-demos">
7879 <div class="snippet-demo-padding"></div>
7880
7881
7882
7883
7884 <div class="snippet-demo">
7885 <div class="snippet-demo-container demo-switch demo-switch__switch-on">
7886 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-1">
7887 <input type="checkbox" id="switch-1" class="mdl-switch__input" checked>
7888 <span class="mdl-switch__label"></span>
7889</label>
7890
7891 </div>
7892 </div>
7893
7894
7895
7896 <div class="snippet-demo">
7897 <div class="snippet-demo-container demo-switch demo-switch__switch-off">
7898 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-2">
7899 <input type="checkbox" id="switch-2" class="mdl-switch__input">
7900 <span class="mdl-switch__label"></span>
7901</label>
7902
7903 </div>
7904 </div>
7905 <div class="snippet-demo-padding"></div>
7906 </div>
7907 <div class="snippet-captions">
7908 <div class="snippet-caption-padding"></div>
7909
7910 <div class="snippet-caption">
7911 Switch on
7912 </div>
7913 <div class="snippet-caption">
7914 Switch off
7915 </div>
7916 <div class="snippet-caption-padding"></div>
7917 </div>
7918 </div>
7919 <div class="snippet-code">
7920 <pre class="language-markup codepen-button-enabled"><code id="switch/switch-on.html">&lt;label class=&quot;mdl-switch mdl-js-switch mdl-js-ripple-effect&quot; for=&quot;switch-1&quot;&gt;
7921 &lt;input type=&quot;checkbox&quot; id=&quot;switch-1&quot; class=&quot;mdl-switch__input&quot; checked&gt;
7922 &lt;span class=&quot;mdl-switch__label&quot;&gt;&lt;/span&gt;
7923&lt;/label&gt;
7924</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="switch/switch-off.html">&lt;label class=&quot;mdl-switch mdl-js-switch mdl-js-ripple-effect&quot; for=&quot;switch-2&quot;&gt;
7925 &lt;input type=&quot;checkbox&quot; id=&quot;switch-2&quot; class=&quot;mdl-switch__input&quot;&gt;
7926 &lt;span class=&quot;mdl-switch__label&quot;&gt;&lt;/span&gt;
7927&lt;/label&gt;
7928</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
7929body {
7930 padding: 20px;
7931 background: #fafafa;
7932 position: relative;
7933}
7934&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
7935 </div>
7936</div>
7937
7938
7939 <!-- Adding the demo page -->
7940
7941 <style>
7942
7943 </style>
7944
7945 <script>
7946
7947 </script>
7948
7949
7950 <div class="docs-text-styling docs-readme">
7951
7952
7953
7954
7955<h2 id="introduction">Introduction</h2>
7956<p>The Material Design Lite (MDL) <strong>switch</strong> component is an enhanced version of the standard HTML <code>&lt;input type=&quot;checkbox&quot;&gt;</code> element. A switch consists of a short horizontal &quot;track&quot; with a prominent circular state indicator and, typically, text that clearly communicates a binary condition that will be set or unset when the user clicks or touches it. Like checkboxes, switches may appear individually or in groups, and can be selected and deselected individually. However, switches provide a more intuitive visual representation of their state: left/gray for <em>off</em>, right/colored for <em>on</em>. The MDL switch component allows you to add both display and click effects.</p>
7957<p>Switches, particularly as a replacement for certain checkboxes, can be a valuable feature in user interfaces, regardless of a site&#39;s content or function. Their design and use is therefore an important factor in the overall user experience. See the switch component&#39;s <a href="http://www.google.com/design/spec/components/selection-controls.html#selection-controls-switch">Material Design specifications page</a> for details.</p>
7958<p>The enhanced switch component has a more vivid visual look than a standard checkbox, and may be initially or programmatically <em>disabled</em>.</p>
7959<h3 id="to-include-an-mdl-switch-component-">To include an MDL <strong>switch</strong> component:</h3>
7960<p>&nbsp;1. Code a <code>&lt;label&gt;</code> element and give it a <code>for</code> attribute whose value is the unique id of the switch it will contain.</p>
7961<pre><code class="language-markup">&lt;label for=&quot;switch1&quot;&gt;
7962...
7963&lt;/label&gt;
7964</code></pre>
7965<p>&nbsp;2. Inside the label, code an <code>&lt;input&gt;</code> element and give it a <code>type</code> attribute whose value is <code>&quot;checkbox&quot;</code>. Also give it an <code>id</code> attribute whose value matches the label&#39;s <code>for</code> attribute value.</p>
7966<pre><code class="language-markup">&lt;label for=&quot;switch1&quot;&gt;
7967 &lt;input type=&quot;checkbox&quot; id=&quot;switch1&quot;&gt;
7968&lt;/label&gt;
7969</code></pre>
7970<p>&nbsp;3. Also inside the label, after the checkbox, code a <code>&lt;span&gt;</code> element containing the switch&#39;s text caption.</p>
7971<pre><code class="language-markup">&lt;label for=&quot;switch1&quot;&gt;
7972 &lt;input type=&quot;checkbox&quot; id=&quot;switch1&quot;&gt;
7973 &lt;span&gt;Sound off/on&lt;/span&gt;
7974&lt;/label&gt;
7975</code></pre>
7976<p>&nbsp;4. Add one or more MDL classes, separated by spaces, to the label, switch, and caption using the <code>class</code> attribute.</p>
7977<pre><code class="language-markup">&lt;label for=&quot;switch1&quot; class=&quot;mdl-switch mdl-js-switch&quot;&gt;
7978 &lt;input type=&quot;checkbox&quot; id=&quot;switch1&quot; class=&quot;mdl-switch__input&quot;&gt;
7979 &lt;span class=&quot;mdl-switch__label&quot;&gt;Sound off/on&lt;/span&gt;
7980&lt;/label&gt;
7981</code></pre>
7982<p>The switch component is ready for use.</p>
7983<h4 id="example">Example</h4>
7984<p>A switch with a ripple click effect.</p>
7985<pre><code class="language-markup">&lt;label for=&quot;switch1&quot; class=&quot;mdl-switch mdl-js-switch mdl-js-ripple-effect&quot;&gt;
7986 &lt;input type=&quot;checkbox&quot; id=&quot;switch1&quot; class=&quot;mdl-switch__input&quot;&gt;
7987 &lt;span class=&quot;mdl-switch__label&quot;&gt;Sound off/on&lt;/span&gt;
7988&lt;/label&gt;
7989</code></pre>
7990<h2 id="configuration-options">Configuration options</h2>
7991<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the switch. The table below lists the available classes and their effects.</p>
7992<table>
7993<thead>
7994<tr>
7995<th>MDL class</th>
7996<th>Effect</th>
7997<th>Remarks</th>
7998</tr>
7999</thead>
8000<tbody>
8001<tr>
8002<td><code>mdl-switch</code></td>
8003<td>Defines label as an MDL component</td>
8004<td>Required on label element</td>
8005</tr>
8006<tr>
8007<td><code>mdl-js-switch</code></td>
8008<td>Assigns basic MDL behavior to label</td>
8009<td>Required on label element</td>
8010</tr>
8011<tr>
8012<td><code>mdl-switch__input</code></td>
8013<td>Applies basic MDL behavior to switch</td>
8014<td>Required on input element (switch)</td>
8015</tr>
8016<tr>
8017<td><code>mdl-switch__label</code></td>
8018<td>Applies basic MDL behavior to caption</td>
8019<td>Required on span element (caption)</td>
8020</tr>
8021<tr>
8022<td><code>mdl-js-ripple-effect</code></td>
8023<td>Applies <em>ripple</em> click effect</td>
8024<td>Optional; goes on label element, not input element (switch)</td>
8025</tr>
8026</tbody>
8027</table>
8028<blockquote>
8029<p><strong>Note:</strong> Disabled versions of all available switch types are provided, and are invoked with the standard HTML boolean attribute <code>disabled</code>. <code>&lt;input type=&quot;checkbox&quot; id=&quot;switch5&quot; class=&quot;mdl-switch__input&quot; disabled&gt;</code>
8030This attribute may be added or removed programmatically via scripting.</p>
8031</blockquote>
8032
8033
8034
8035 </div>
8036
8037 </div>
8038 </section>
8039 <section id="tables-section" class="mdl-components__page mdl-grid">
8040 <div class="mdl-cell mdl-cell--12-col">
8041 <div class="docs-text-styling component-title">
8042 <h3>Tables</h3>
8043 <p>Organize data.</p>
8044 </div>
8045
8046
8047
8048
8049
8050
8051 <!-- Add warning, if the component has one -->
8052
8053 <!-- Generating snippets -->
8054
8055
8056
8057<div class="snippet-group">
8058
8059 <div class="snippet-header">
8060 <div class="snippet-demos">
8061 <div class="snippet-demo-padding"></div>
8062
8063
8064
8065
8066 <div class="snippet-demo">
8067 <div class="snippet-demo-container demo-data-table demo-data-table__data-table">
8068 <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
8069 <thead>
8070 <tr>
8071 <th class="mdl-data-table__cell--non-numeric">Material</th>
8072 <th>Quantity</th>
8073 <th>Unit price</th>
8074 </tr>
8075 </thead>
8076 <tbody>
8077 <tr>
8078 <td class="mdl-data-table__cell--non-numeric">Acrylic (Transparent)</td>
8079 <td>25</td>
8080 <td>$2.90</td>
8081 </tr>
8082 <tr>
8083 <td class="mdl-data-table__cell--non-numeric">Plywood (Birch)</td>
8084 <td>50</td>
8085 <td>$1.25</td>
8086 </tr>
8087 <tr>
8088 <td class="mdl-data-table__cell--non-numeric">Laminate (Gold on Blue)</td>
8089 <td>10</td>
8090 <td>$2.35</td>
8091 </tr>
8092 </tbody>
8093</table>
8094
8095 </div>
8096 </div>
8097 <div class="snippet-demo-padding"></div>
8098 </div>
8099 <div class="snippet-captions">
8100 <div class="snippet-caption-padding"></div>
8101
8102 <div class="snippet-caption">
8103 Data table
8104 </div>
8105 <div class="snippet-caption-padding"></div>
8106 </div>
8107 </div>
8108 <div class="snippet-code">
8109 <pre class="language-markup codepen-button-enabled"><code id="data-table/data-table.html">&lt;table class=&quot;mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp&quot;&gt;
8110 &lt;thead&gt;
8111 &lt;tr&gt;
8112 &lt;th class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Material&lt;/th&gt;
8113 &lt;th&gt;Quantity&lt;/th&gt;
8114 &lt;th&gt;Unit price&lt;/th&gt;
8115 &lt;/tr&gt;
8116 &lt;/thead&gt;
8117 &lt;tbody&gt;
8118 &lt;tr&gt;
8119 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Acrylic (Transparent)&lt;/td&gt;
8120 &lt;td&gt;25&lt;/td&gt;
8121 &lt;td&gt;$2.90&lt;/td&gt;
8122 &lt;/tr&gt;
8123 &lt;tr&gt;
8124 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Plywood (Birch)&lt;/td&gt;
8125 &lt;td&gt;50&lt;/td&gt;
8126 &lt;td&gt;$1.25&lt;/td&gt;
8127 &lt;/tr&gt;
8128 &lt;tr&gt;
8129 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Laminate (Gold on Blue)&lt;/td&gt;
8130 &lt;td&gt;10&lt;/td&gt;
8131 &lt;td&gt;$2.35&lt;/td&gt;
8132 &lt;/tr&gt;
8133 &lt;/tbody&gt;
8134&lt;/table&gt;
8135</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
8136body {
8137 padding: 20px;
8138 background: #fafafa;
8139 position: relative;
8140}
8141&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
8142 </div>
8143</div>
8144
8145
8146 <!-- Adding the demo page -->
8147
8148 <style>
8149
8150 </style>
8151
8152 <script>
8153
8154 </script>
8155
8156
8157 <div class="docs-text-styling docs-readme">
8158
8159
8160
8161
8162<h2 id="introduction">Introduction</h2>
8163<p>The Material Design Lite (MDL) <strong>data-table</strong> component is an enhanced version of the standard HTML <code>&lt;table&gt;</code>. A data-table consists of rows and columns of well-formatted data, presented with appropriate user interaction capabilities.</p>
8164<p>Tables are a ubiquitous feature of most user interfaces, regardless of a site&#39;s content or function. Their design and use is therefore an important factor in the overall user experience. See the data-table component&#39;s <a href="http://www.google.com/design/spec/components/data-tables.html">Material Design specifications page</a> for details.</p>
8165<p>The available row/column/cell types in a data-table are mostly self-formatting; that is, once the data-table is defined, the individual cells require very little specific attention. For example, the rows exhibit shading behavior on mouseover and selection, numeric values are automatically formatted by default, and the addition of a single class makes the table rows individually or collectively selectable. This makes the data-table component convenient and easy to code for the developer, as well as attractive and intuitive for the user.</p>
8166<h3 id="to-include-an-mdl-data-table-component-">To include an MDL <strong>data-table</strong> component:</h3>
8167<p>&nbsp;1. Code a <code>&lt;table&gt;</code> element. Include <code>&lt;thead&gt;</code> and <code>&lt;tbody&gt;</code> elements to hold the title and data rows, respectively.</p>
8168<pre><code class="language-markup">&lt;table&gt;
8169 &lt;thead&gt;
8170 &lt;/thead&gt;
8171 &lt;tbody&gt;
8172 &lt;/tbody&gt;
8173&lt;/table&gt;
8174</code></pre>
8175<p>&nbsp;2. Add one or more MDL classes, separated by spaces, to the table using the <code>class</code> attribute.</p>
8176<pre><code class="language-markup">&lt;table class=&quot;mdl-data-table mdl-js-data-table&quot;&gt;
8177 &lt;thead&gt;
8178 &lt;/thead&gt;
8179 &lt;tbody&gt;
8180 &lt;/tbody&gt;
8181&lt;/table&gt;
8182</code></pre>
8183<p>&nbsp;2. Inside the <code>&lt;thead&gt;</code>, code exactly one table row <code>&lt;tr&gt;</code> containing one table header cell <code>&lt;th&gt;</code> for each column, and include the desired text in the header cells. To ensure proper header alignment, add the &quot;non-numeric&quot; MDL class to the header cell of text-only columns. (Data cells are formatted as numeric by default.)</p>
8184<pre><code class="language-markup">&lt;table class=&quot;mdl-data-table mdl-js-data-table&quot;&gt;
8185 &lt;thead&gt;
8186 &lt;tr&gt;
8187 &lt;th class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Name&lt;/th&gt;
8188 &lt;th&gt;Age&lt;/th&gt;
8189 &lt;th&gt;ID Number&lt;/th&gt;
8190 &lt;/tr&gt;
8191 &lt;/thead&gt;
8192 &lt;tbody&gt;
8193 &lt;/tbody&gt;
8194&lt;/table&gt;
8195</code></pre>
8196<p>&nbsp;3. Inside the <code>&lt;tbody&gt;</code>, code one table row <code>&lt;tr&gt;</code> for each data row and one table data cell <code>&lt;td&gt;</code> for each column in the row. As with the header cells, add the &quot;non-numeric&quot; MDL class to text-only data cells to ensure proper alignment.</p>
8197<pre><code class="language-markup">&lt;table class=&quot;mdl-data-table mdl-js-data-table&quot;&gt;
8198 &lt;thead&gt;
8199 &lt;tr&gt;
8200 &lt;th class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Name&lt;/th&gt;
8201 &lt;th&gt;Age&lt;/th&gt;
8202 &lt;th&gt;ID Number&lt;/th&gt;
8203 &lt;/tr&gt;
8204 &lt;/thead&gt;
8205 &lt;tbody&gt;
8206 &lt;tr&gt;
8207 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Don Aubrey&lt;/td&gt;
8208 &lt;td&gt;25&lt;/td&gt;
8209 &lt;td&gt;49021&lt;/td&gt;
8210 &lt;/tr&gt;
8211 &lt;tr&gt;
8212 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Sophia Carson&lt;/td&gt;
8213 &lt;td&gt;32&lt;/td&gt;
8214 &lt;td&gt;10258&lt;/td&gt;
8215 &lt;/tr&gt;
8216 &lt;tr&gt;
8217 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Steve Moreno&lt;/td&gt;
8218 &lt;td&gt;29&lt;/td&gt;
8219 &lt;td&gt;12359&lt;/td&gt;
8220 &lt;/tr&gt;
8221 &lt;/tbody&gt;
8222&lt;/table&gt;
8223</code></pre>
8224<p>The data-table component is ready for use.</p>
8225<h4 id="examples">Examples</h4>
8226<p>A data-table with a &quot;master&quot; select checkbox and individual row select checkboxes.</p>
8227<pre><code class="language-markup">&lt;table class=&quot;mdl-data-table mdl-js-data-table mdl-data-table--selectable&quot;&gt;
8228 &lt;thead&gt;
8229 &lt;tr&gt;
8230 &lt;th class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Material&lt;/th&gt;
8231 &lt;th&gt;Quantity&lt;/th&gt;
8232 &lt;th&gt;Unit price&lt;/th&gt;
8233 &lt;/tr&gt;
8234 &lt;/thead&gt;
8235 &lt;tbody&gt;
8236 &lt;tr&gt;
8237 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Acrylic (Transparent)&lt;/td&gt;
8238 &lt;td&gt;250&lt;/td&gt;
8239 &lt;td&gt;$2.90&lt;/td&gt;
8240 &lt;/tr&gt;
8241 &lt;tr&gt;
8242 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Plywood (Birch)&lt;/td&gt;
8243 &lt;td&gt;50&lt;/td&gt;
8244 &lt;td&gt;$1.25&lt;/td&gt;
8245 &lt;/tr&gt;
8246 &lt;tr&gt;
8247 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Laminate (Gold on Blue)&lt;/td&gt;
8248 &lt;td&gt;10&lt;/td&gt;
8249 &lt;td&gt;$12.35&lt;/td&gt;
8250 &lt;/tr&gt;
8251 &lt;/tbody&gt;
8252&lt;/table&gt;
8253</code></pre>
8254<p>A data-table without select checkboxes containing mostly text data.</p>
8255<pre><code class="language-markup">&lt;table class=&quot;mdl-data-table mdl-js-data-table&quot;&gt;
8256 &lt;thead&gt;
8257 &lt;tr&gt;
8258 &lt;th class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Name&lt;/th&gt;
8259 &lt;th class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Nickname&lt;/th&gt;
8260 &lt;th&gt;Age&lt;/th&gt;
8261 &lt;th class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Living?&lt;/th&gt;
8262 &lt;/tr&gt;
8263 &lt;/thead&gt;
8264 &lt;tbody&gt;
8265 &lt;tr&gt;
8266 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;John Lennon&lt;/td&gt;
8267 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;The smart one&lt;/td&gt;
8268 &lt;td&gt;40&lt;/td&gt;
8269 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;No&lt;/td&gt;
8270 &lt;/tr&gt;
8271 &lt;tr&gt;
8272 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Paul McCartney&lt;/td&gt;
8273 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;The cute one&lt;/td&gt;
8274 &lt;td&gt;73&lt;/td&gt;
8275 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Yes&lt;/td&gt;
8276 &lt;/tr&gt;
8277 &lt;tr&gt;
8278 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;George Harrison&lt;/td&gt;
8279 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;The shy one&lt;/td&gt;
8280 &lt;td&gt;58&lt;/td&gt;
8281 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;No&lt;/td&gt;
8282 &lt;/tr&gt;
8283 &lt;tr&gt;
8284 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Ringo Starr&lt;/td&gt;
8285 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;The funny one&lt;/td&gt;
8286 &lt;td&gt;74&lt;/td&gt;
8287 &lt;td class=&quot;mdl-data-table__cell--non-numeric&quot;&gt;Yes&lt;/td&gt;
8288 &lt;/tr&gt;
8289 &lt;/tbody&gt;
8290&lt;/table&gt;
8291</code></pre>
8292<h2 id="configuration-options">Configuration options</h2>
8293<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the data-table. The table below lists the available classes and their effects.</p>
8294<table>
8295<thead>
8296<tr>
8297<th>MDL class</th>
8298<th>Effect</th>
8299<th>Remarks</th>
8300</tr>
8301</thead>
8302<tbody>
8303<tr>
8304<td><code>mdl-data-table</code></td>
8305<td>Defines table as an MDL component</td>
8306<td>Required on table element</td>
8307</tr>
8308<tr>
8309<td><code>mdl-js-data-table</code></td>
8310<td>Assigns basic MDL behavior to table</td>
8311<td>Required on table element</td>
8312</tr>
8313<tr>
8314<td><code>mdl-data-table--selectable</code></td>
8315<td>Applies all/individual selectable behavior (checkboxes)</td>
8316<td>Optional; goes on table element</td>
8317</tr>
8318<tr>
8319<td><code>mdl-data-table__header--sorted-ascending</code></td>
8320<td>Applies visual styling to indicate the column is sorted in ascending order</td>
8321<td>Optional; goes on table header (<code>th</code>)</td>
8322</tr>
8323<tr>
8324<td><code>mdl-data-table__header--sorted-descending</code></td>
8325<td>Applies visual styling to indicate the column is sorted in descending order</td>
8326<td>Optional; goes on table header (<code>th</code>)</td>
8327</tr>
8328<tr>
8329<td><code>mdl-data-table__cell--non-numeric</code></td>
8330<td>Applies text formatting to data cell</td>
8331<td>Optional; goes on both table header and table data cells</td>
8332</tr>
8333<tr>
8334<td>(none)</td>
8335<td>Applies numeric formatting to header or data cell (default)</td>
8336</tr>
8337</tbody>
8338</table>
8339
8340
8341
8342 </div>
8343
8344 </div>
8345 </section>
8346 <section id="textfields-section" class="mdl-components__page mdl-grid">
8347 <div class="mdl-cell mdl-cell--12-col">
8348 <div class="docs-text-styling component-title">
8349 <h3>Text Fields</h3>
8350 <p>Textual input components.</p>
8351 </div>
8352
8353
8354
8355
8356
8357
8358 <!-- Add warning, if the component has one -->
8359
8360 <!-- Generating snippets -->
8361
8362
8363
8364<div class="snippet-group">
8365
8366 <div class="snippet-header">
8367 <div class="snippet-demos">
8368 <div class="snippet-demo-padding"></div>
8369
8370
8371
8372
8373 <div class="snippet-demo">
8374 <div class="snippet-demo-container demo-textfield demo-textfield__textfield-text">
8375 <style>
8376 .demo-textfield__textfield-text .mdl-textfield {
8377 width: 100px;
8378 }
8379</style>
8380
8381<!-- Simple Textfield -->
8382<form action="#">
8383 <div class="mdl-textfield mdl-js-textfield">
8384 <input class="mdl-textfield__input" type="text" id="sample1">
8385 <label class="mdl-textfield__label" for="sample1">Text...</label>
8386 </div>
8387</form>
8388
8389
8390 </div>
8391 </div>
8392
8393
8394
8395 <div class="snippet-demo">
8396 <div class="snippet-demo-container demo-textfield demo-textfield__textfield-numeric">
8397 <style>
8398 .demo-textfield__textfield-numeric .mdl-textfield {
8399 width: 100px;
8400 }
8401</style>
8402
8403<!-- Numeric Textfield -->
8404<form action="#">
8405 <div class="mdl-textfield mdl-js-textfield">
8406 <input class="mdl-textfield__input" type="text" pattern="-?[0-9]*(\.[0-9]+)?" id="sample2">
8407 <label class="mdl-textfield__label" for="sample2">Number...</label>
8408 <span class="mdl-textfield__error">Input is not a number!</span>
8409 </div>
8410</form>
8411
8412
8413 </div>
8414 </div>
8415 <div class="snippet-demo-padding"></div>
8416 </div>
8417 <div class="snippet-captions">
8418 <div class="snippet-caption-padding"></div>
8419
8420 <div class="snippet-caption">
8421 Text
8422 </div>
8423 <div class="snippet-caption">
8424 Numeric
8425 </div>
8426 <div class="snippet-caption-padding"></div>
8427 </div>
8428 </div>
8429 <div class="snippet-code">
8430 <pre class="language-markup codepen-button-enabled"><code id="textfield/textfield-text.html">&lt;!-- Simple Textfield --&gt;
8431&lt;form action=&quot;#&quot;&gt;
8432 &lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8433 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;sample1&quot;&gt;
8434 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;sample1&quot;&gt;Text...&lt;/label&gt;
8435 &lt;/div&gt;
8436&lt;/form&gt;
8437</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="textfield/textfield-numeric.html">&lt;!-- Numeric Textfield --&gt;
8438&lt;form action=&quot;#&quot;&gt;
8439 &lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8440 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; pattern=&quot;-?[0-9]*(\.[0-9]+)?&quot; id=&quot;sample2&quot;&gt;
8441 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;sample2&quot;&gt;Number...&lt;/label&gt;
8442 &lt;span class=&quot;mdl-textfield__error&quot;&gt;Input is not a number!&lt;/span&gt;
8443 &lt;/div&gt;
8444&lt;/form&gt;
8445</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
8446body {
8447 padding: 20px;
8448 background: #fafafa;
8449 position: relative;
8450}
8451&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
8452 </div>
8453</div>
8454
8455
8456
8457
8458<div class="snippet-group">
8459
8460 <div class="snippet-header">
8461 <div class="snippet-demos">
8462 <div class="snippet-demo-padding"></div>
8463
8464
8465
8466
8467 <div class="snippet-demo">
8468 <div class="snippet-demo-container demo-textfield demo-textfield__textfield-floating-text">
8469 <style>
8470 .demo-textfield__textfield-floating-text .mdl-textfield {
8471 width: 100px;
8472 }
8473</style>
8474
8475<!-- Textfield with Floating Label -->
8476
8477<form action="#">
8478 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
8479 <input class="mdl-textfield__input" type="text" id="sample3">
8480 <label class="mdl-textfield__label" for="sample3">Text...</label>
8481 </div>
8482</form>
8483
8484
8485 </div>
8486 </div>
8487
8488
8489
8490 <div class="snippet-demo">
8491 <div class="snippet-demo-container demo-textfield demo-textfield__textfield-floating-numeric">
8492 <style>
8493 .demo-textfield__textfield-floating-numeric .mdl-textfield {
8494 width: 100px;
8495 }
8496</style>
8497
8498<!-- Numeric Textfield with Floating Label -->
8499<form action="#">
8500 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
8501 <input class="mdl-textfield__input" type="text" pattern="-?[0-9]*(\.[0-9]+)?" id="sample4">
8502 <label class="mdl-textfield__label" for="sample4">Number...</label>
8503 <span class="mdl-textfield__error">Input is not a number!</span>
8504 </div>
8505</form>
8506
8507
8508 </div>
8509 </div>
8510 <div class="snippet-demo-padding"></div>
8511 </div>
8512 <div class="snippet-captions">
8513 <div class="snippet-caption-padding"></div>
8514
8515 <div class="snippet-caption">
8516 Text with floating label
8517 </div>
8518 <div class="snippet-caption">
8519 Numeric with floating label
8520 </div>
8521 <div class="snippet-caption-padding"></div>
8522 </div>
8523 </div>
8524 <div class="snippet-code">
8525 <pre class="language-markup codepen-button-enabled"><code id="textfield/textfield-floating-text.html">&lt;!-- Textfield with Floating Label --&gt;
8526
8527&lt;form action=&quot;#&quot;&gt;
8528 &lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--floating-label&quot;&gt;
8529 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;sample3&quot;&gt;
8530 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;sample3&quot;&gt;Text...&lt;/label&gt;
8531 &lt;/div&gt;
8532&lt;/form&gt;
8533</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="textfield/textfield-floating-numeric.html">&lt;!-- Numeric Textfield with Floating Label --&gt;
8534&lt;form action=&quot;#&quot;&gt;
8535 &lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--floating-label&quot;&gt;
8536 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; pattern=&quot;-?[0-9]*(\.[0-9]+)?&quot; id=&quot;sample4&quot;&gt;
8537 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;sample4&quot;&gt;Number...&lt;/label&gt;
8538 &lt;span class=&quot;mdl-textfield__error&quot;&gt;Input is not a number!&lt;/span&gt;
8539 &lt;/div&gt;
8540&lt;/form&gt;
8541</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
8542body {
8543 padding: 20px;
8544 background: #fafafa;
8545 position: relative;
8546}
8547&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
8548 </div>
8549</div>
8550
8551
8552
8553
8554<div class="snippet-group">
8555
8556 <div class="snippet-header">
8557 <div class="snippet-demos">
8558 <div class="snippet-demo-padding"></div>
8559
8560
8561
8562
8563 <div class="snippet-demo">
8564 <div class="snippet-demo-container demo-textfield demo-textfield__textfield-multi-line">
8565 <style>
8566 .demo-textfield__textfield-multi-line .mdl-textfield {
8567 width: 100px;
8568 }
8569</style>
8570
8571<!-- Floating Multiline Textfield -->
8572<form action="#">
8573 <div class="mdl-textfield mdl-js-textfield">
8574 <textarea class="mdl-textfield__input" type="text" rows= "3" id="sample5" ></textarea>
8575 <label class="mdl-textfield__label" for="sample5">Text lines...</label>
8576 </div>
8577</form>
8578
8579
8580 </div>
8581 </div>
8582
8583
8584
8585 <div class="snippet-demo">
8586 <div class="snippet-demo-container demo-textfield demo-textfield__textfield-expanding">
8587 <style>
8588 .demo-textfield__textfield-expanding .mdl-textfield {
8589 width: 100px;
8590 }
8591</style>
8592
8593<!-- Expandable Textfield -->
8594<form action="#">
8595 <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
8596 <label class="mdl-button mdl-js-button mdl-button--icon" for="sample6">
8597 <i class="material-icons">search</i>
8598 </label>
8599 <div class="mdl-textfield__expandable-holder">
8600 <input class="mdl-textfield__input" type="text" id="sample6">
8601 <label class="mdl-textfield__label" for="sample-expandable">Expandable Input</label>
8602 </div>
8603 </div>
8604</form>
8605
8606
8607 </div>
8608 </div>
8609 <div class="snippet-demo-padding"></div>
8610 </div>
8611 <div class="snippet-captions">
8612 <div class="snippet-caption-padding"></div>
8613
8614 <div class="snippet-caption">
8615 Multiple line
8616 </div>
8617 <div class="snippet-caption">
8618 Expanding
8619 </div>
8620 <div class="snippet-caption-padding"></div>
8621 </div>
8622 </div>
8623 <div class="snippet-code">
8624 <pre class="language-markup codepen-button-enabled"><code id="textfield/textfield-multi-line.html">&lt;!-- Floating Multiline Textfield --&gt;
8625&lt;form action=&quot;#&quot;&gt;
8626 &lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8627 &lt;textarea class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; rows= &quot;3&quot; id=&quot;sample5&quot; &gt;&lt;/textarea&gt;
8628 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;sample5&quot;&gt;Text lines...&lt;/label&gt;
8629 &lt;/div&gt;
8630&lt;/form&gt;
8631</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="textfield/textfield-expanding.html">&lt;!-- Expandable Textfield --&gt;
8632&lt;form action=&quot;#&quot;&gt;
8633 &lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--expandable&quot;&gt;
8634 &lt;label class=&quot;mdl-button mdl-js-button mdl-button--icon&quot; for=&quot;sample6&quot;&gt;
8635 &lt;i class=&quot;material-icons&quot;&gt;search&lt;/i&gt;
8636 &lt;/label&gt;
8637 &lt;div class=&quot;mdl-textfield__expandable-holder&quot;&gt;
8638 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;sample6&quot;&gt;
8639 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;sample-expandable&quot;&gt;Expandable Input&lt;/label&gt;
8640 &lt;/div&gt;
8641 &lt;/div&gt;
8642&lt;/form&gt;
8643</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
8644body {
8645 padding: 20px;
8646 background: #fafafa;
8647 position: relative;
8648}
8649&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
8650 </div>
8651</div>
8652
8653
8654 <!-- Adding the demo page -->
8655
8656 <style>
8657
8658 </style>
8659
8660 <script>
8661
8662 </script>
8663
8664
8665 <div class="docs-text-styling docs-readme">
8666
8667
8668
8669
8670<h2 id="introduction">Introduction</h2>
8671<p>The Material Design Lite (MDL) <strong>text field</strong> component is an enhanced version of the standard HTML <code>&lt;input type=&quot;text&quot;&gt;</code> and <code>&lt;input type=&quot;textarea&quot;&gt;</code> elements. A text field consists of a horizontal line indicating where keyboard input can occur and, typically, text that clearly communicates the intended contents of the text field. The MDL text field component provides various types of text fields, and allows you to add both display and click effects.</p>
8672<p>Text fields are a common feature of most user interfaces, regardless of a site&#39;s content or function. Their design and use is therefore an important factor in the overall user experience. See the text field component&#39;s <a href="http://www.google.com/design/spec/components/text-fields.html">Material Design specifications page</a> for details.</p>
8673<p>The enhanced text field component has a more vivid visual look than a standard text field, and may be initially or programmatically <em>disabled</em>.
8674There are three main types of text fields in the text field component, each with its own basic coding requirements. The types are <em>single-line</em>, <em>multi-line</em>, and <em>expandable</em>.</p>
8675<h3 id="to-include-a-single-line-mdl-text-field-component-">To include a <em>single-line</em> MDL <strong>text field</strong> component:</h3>
8676<p>&nbsp;1. Code a <code>&lt;div&gt;</code> element to hold the text field.</p>
8677<pre><code class="language-markup">&lt;div&gt;
8678...
8679&lt;/div&gt;
8680</code></pre>
8681<p>&nbsp;2. Inside the div, code an <code>&lt;input&gt;</code> element with a <code>type</code> attribute of <code>&quot;text&quot;</code> (the text field), and an <code>id</code> attribute of your choice.</p>
8682<pre><code class="language-markup">&lt;div&gt;
8683 &lt;input type=&quot;text&quot; id=&quot;user&quot;&gt;
8684&lt;/div&gt;
8685</code></pre>
8686<p>&nbsp;3. Also inside the div, after the text field, code a <code>&lt;label&gt;</code> element with a <code>for</code> attribute whose value matches the <code>input</code> element&#39;s <code>id</code> value, and a short string to be used as the field&#39;s placeholder text.</p>
8687<pre><code class="language-markup">&lt;div&gt;
8688 &lt;input type=&quot;text&quot; id=&quot;user&quot;&gt;
8689 &lt;label for=&quot;user&quot;&gt;User name&lt;/label&gt;
8690&lt;/div&gt;
8691</code></pre>
8692<p>&nbsp;4. Optionally, add a <code>pattern</code> attribute and value to the <code>&lt;input&gt;</code> element (see the <a href="http://www.w3.org/TR/html5/forms.html#the-pattern-attribute">W3C HTML5 forms specification</a> for details) and an associated error message in a <code>&lt;span&gt;</code> element following the <code>&lt;label&gt;</code>.</p>
8693<pre><code class="language-markup">&lt;div&gt;
8694 &lt;input type=&quot;text&quot; id=&quot;user&quot; pattern=&quot;[A-Z,a-z, ]*&quot;&gt;
8695 &lt;label for=&quot;user&quot;&gt;User name&lt;/label&gt;
8696 &lt;span&gt;Letters and spaces only&lt;/span&gt;
8697&lt;/div&gt;
8698</code></pre>
8699<p>&nbsp;5. Add one or more MDL classes, separated by spaces, to the div container, text field, field label, and error message using the <code>class</code> attribute.</p>
8700<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8701 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;user&quot; pattern=&quot;[A-Z,a-z, ]*&quot;&gt;
8702 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;user&quot;&gt;User name&lt;/label&gt;
8703 &lt;span class=&quot;mdl-textfield__error&quot;&gt;Letters and spaces only&lt;/span&gt;
8704&lt;/div&gt;
8705</code></pre>
8706<p>The single-line text field component is ready for use.</p>
8707<h4 id="examples">Examples</h4>
8708<p>Single-line text field with a standard label.</p>
8709<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8710 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;fname&quot;&gt;
8711 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;fname&quot;&gt;First name&lt;/label&gt;
8712&lt;/div&gt;
8713</code></pre>
8714<p>Single-line text field with a floating label.</p>
8715<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--floating-label&quot;&gt;
8716 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;addr1&quot;&gt;
8717 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;addr1&quot;&gt;Address line 1&lt;/label&gt;
8718&lt;/div&gt;
8719</code></pre>
8720<p>Single-line text field with a standard label, pattern matching, and error message.</p>
8721<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8722 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; pattern=&quot;[0-9]*&quot; id=&quot;phone&quot;&gt;
8723 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;phone&quot;&gt;Phone&lt;/label&gt;
8724 &lt;span class=&quot;mdl-textfield__error&quot;&gt;Digits only&lt;/span&gt;
8725&lt;/div&gt;
8726</code></pre>
8727<h3 id="to-include-a-multi-line-mdl-text-field-component-">To include a <em>multi-line</em> MDL <strong>text field</strong> component:</h3>
8728<p>&nbsp;1. Code a <code>&lt;div&gt;</code> element to hold the text field.</p>
8729<pre><code class="language-markup">&lt;div&gt;
8730...
8731&lt;/div&gt;
8732</code></pre>
8733<p>&nbsp;2. Inside the div, code a <code>&lt;textarea&gt;</code> element with a <code>type</code> attribute of <code>&quot;text&quot;</code> (the multi-line text field), and an <code>id</code> attribute of your choice. Include a <code>rows</code> attribute with a value of <code>&quot;1&quot;</code> (this attribute sets the number of <em>concurrently visible</em> input rows).</p>
8734<pre><code class="language-markup">&lt;div&gt;
8735 &lt;textarea type=&quot;text&quot; rows=&quot;1&quot; id=&quot;address&quot;&gt;&lt;/textarea&gt;
8736&lt;/div&gt;
8737</code></pre>
8738<p>&nbsp;3. Also inside the div, after the text field, code a <code>&lt;label&gt;</code> element with a <code>for</code> attribute whose value matches the <code>&lt;textarea&gt;</code> element&#39;s <code>id</code> value, and a short string to be used as the field&#39;s placeholder text.</p>
8739<pre><code class="language-markup">&lt;div&gt;
8740 &lt;textarea type=&quot;text&quot; rows=&quot;1&quot; id=&quot;address&quot;&gt;&lt;/textarea&gt;
8741 &lt;label for=&quot;address&quot;&gt;Full address&lt;/label&gt;
8742&lt;/div&gt;
8743</code></pre>
8744<p>&nbsp;4. Add one or more MDL classes, separated by spaces, to the div container, text field, and field label using the <code>class</code> attribute.</p>
8745<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8746 &lt;textarea class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; rows=&quot;1&quot; id=&quot;address&quot;&gt;&lt;/textarea&gt;
8747 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;address&quot;&gt;Full address&lt;/label&gt;
8748&lt;/div&gt;
8749</code></pre>
8750<p>The multi-line text field component is ready for use.</p>
8751<h4 id="examples">Examples</h4>
8752<p>Multi-line text field with one visible input line.</p>
8753<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8754 &lt;textarea class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; rows=&quot;1&quot; id=&quot;schools&quot;&gt;&lt;/textarea&gt;
8755 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;schools&quot;&gt;Schools attended&lt;/label&gt;
8756&lt;/div&gt;
8757</code></pre>
8758<p>Multi-line text field with one visible input line and floating label.</p>
8759<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--floating-label&quot;&gt;
8760 &lt;textarea class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; rows= &quot;1&quot; id=&quot;schools&quot;&gt;&lt;/textarea&gt;
8761 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;schools&quot;&gt;Schools attended&lt;/label&gt;
8762&lt;/div&gt;
8763</code></pre>
8764<p>Multi-line text field with multiple visible input lines and a maximum number of lines.</p>
8765<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield&quot;&gt;
8766 &lt;textarea class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; rows=&quot;3&quot; maxrows=&quot;6&quot;
8767 id=&quot;schools&quot;&gt;&lt;/textarea&gt;
8768 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;schools&quot;&gt;Schools attended (max. 6)&lt;/label&gt;
8769&lt;/div&gt;
8770</code></pre>
8771<h3 id="to-include-an-expandable-mdl-text-field-component-">To include an <em>expandable</em> MDL <strong>text field</strong> component:</h3>
8772<p>&nbsp;1. Code an &quot;outer&quot; <code>&lt;div&gt;</code> element to hold the expandable text field.</p>
8773<pre><code class="language-markup">&lt;div&gt;
8774...
8775&lt;/div&gt;
8776</code></pre>
8777<p>&nbsp;2. Inside the div, code a <code>&lt;label&gt;</code> element with a <code>for</code> attribute whose value will match the <code>&lt;input&gt;</code> element&#39;s <code>id</code> value (to be coded in step 5).</p>
8778<pre><code class="language-markup">&lt;div&gt;
8779 &lt;label for=&quot;expando1&quot;&gt;
8780 ...
8781 &lt;/label&gt;
8782&lt;/div&gt;
8783</code></pre>
8784<p>&nbsp;3. Inside the label, code a <code>&lt;span&gt;</code> element; the span should be empty, and should be the label&#39;s only content. This element will contain the expandable text field&#39;s icon.</p>
8785<pre><code class="language-markup">&lt;div&gt;
8786 &lt;label for=&quot;expando1&quot;&gt;
8787 &lt;span&gt;&lt;/span&gt;
8788 &lt;/label&gt;
8789&lt;/div&gt;
8790</code></pre>
8791<p>&nbsp;4. Still inside the &quot;outer&quot; div, after the label containing the span, code an &quot;inner&quot; (nested) <code>&lt;div&gt;</code> element.</p>
8792<pre><code class="language-markup">&lt;div&gt;
8793 &lt;label for=&quot;expando1&quot;&gt;
8794 &lt;span&gt;&lt;/span&gt;
8795 &lt;/label&gt;
8796 &lt;div&gt;
8797 ...
8798 &lt;/div&gt;
8799&lt;/div&gt;
8800</code></pre>
8801<p>&nbsp;5. Inside the &quot;inner&quot; div, code an <code>&lt;input&gt;</code> element with a <code>type</code> attribute of <code>&quot;text&quot;</code> (the text field), and an <code>id</code> attribute whose value matches that of the <code>for</code> attribute in step 2.</p>
8802<pre><code class="language-markup">&lt;div&gt;
8803 &lt;label for=&quot;expando1&quot;&gt;
8804 &lt;span&gt;&lt;/span&gt;
8805 &lt;/label&gt;
8806 &lt;div&gt;
8807 &lt;input type=&quot;text&quot; id=&quot;expando1&quot;&gt;
8808 &lt;/div&gt;
8809&lt;/div&gt;
8810</code></pre>
8811<p>&nbsp;6. Still inside the &quot;inner&quot; div, after the text field, code a <code>&lt;label&gt;</code> element with a <code>for</code> attribute whose value also matches the <code>&lt;input&gt;</code> element&#39;s <code>id</code> value (coded in step 5), and a short string to be used as the field&#39;s placeholder text.</p>
8812<pre><code class="language-markup">&lt;div&gt;
8813 &lt;label for=&quot;expando1&quot;&gt;
8814 &lt;span&gt;&lt;/span&gt;
8815 &lt;/label&gt;
8816 &lt;div&gt;
8817 &lt;input type=&quot;text&quot; id=&quot;expando1&quot;&gt;
8818 &lt;label for=&quot;expando1&quot;&gt;Expandable text field&lt;/label&gt;
8819 &lt;/div&gt;
8820&lt;/div&gt;
8821</code></pre>
8822<p>&nbsp;7. Add one or more MDL classes, separated by spaces, to the &quot;outer&quot; div container, label, and span, and to the &quot;inner&quot; div container, text field, and field label using the <code>class</code> attribute.</p>
8823<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--expandable&quot;&gt;
8824 &lt;label class=&quot;mdl-button mdl-js-button mdl-button--icon&quot; for=&quot;expando1&quot;&gt;
8825 &lt;i class=&quot;material-icons&quot;&gt;search&lt;/i&gt;
8826 &lt;/label&gt;
8827 &lt;div class=&quot;mdl-textfield__expandable-holder&quot;&gt;
8828 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;expando1&quot;&gt;
8829 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;expando1&quot;&gt;Expandable text field&lt;/label&gt;
8830 &lt;/div&gt;
8831&lt;/div&gt;
8832</code></pre>
8833<p>The expandable text field component is ready for use. It will expand when the icon (the empty <code>&lt;span&gt;</code>) is clicked or gains focus.</p>
8834<h4 id="examples">Examples</h4>
8835<p>Expandable text field with a standard label.</p>
8836<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--expandable&quot;&gt;
8837 &lt;label class=&quot;mdl-button mdl-js-button mdl-button--icon&quot; for=&quot;search-expandable&quot;&gt;
8838 &lt;i class=&quot;material-icons&quot;&gt;search&lt;/i&gt;
8839 &lt;/label&gt;
8840 &lt;div class=&quot;mdl-textfield__expandable-holder&quot;&gt;
8841 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;search-expandable&quot;&gt;
8842 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;search-expandable&quot;&gt;Search text&lt;/label&gt;
8843 &lt;/div&gt;
8844&lt;/div&gt;
8845</code></pre>
8846<p>Expandable text field with a floating label.</p>
8847<pre><code class="language-markup">&lt;div class=&quot;mdl-textfield mdl-js-textfield mdl-textfield--expandable
8848 mdl-textfield--floating-label&quot;&gt;
8849 &lt;label class=&quot;mdl-button mdl-js-button mdl-button--icon&quot; for=&quot;search-expandable2&quot;&gt;
8850 &lt;i class=&quot;material-icons&quot;&gt;search&lt;/i&gt;
8851 &lt;/label&gt;
8852 &lt;div class=&quot;mdl-textfield__expandable-holder&quot;&gt;
8853 &lt;input class=&quot;mdl-textfield__input&quot; type=&quot;text&quot; id=&quot;search-expandable2&quot;&gt;
8854 &lt;label class=&quot;mdl-textfield__label&quot; for=&quot;search-expandable2&quot;&gt;
8855 Enter search text below
8856 &lt;/label&gt;
8857 &lt;/div&gt;
8858&lt;/div&gt;
8859</code></pre>
8860<h2 id="configuration-options">Configuration options</h2>
8861<p>The MDL CSS classes apply various predefined visual and behavioral enhancements to the text field. The table below lists the available classes and their effects.</p>
8862<table>
8863<thead>
8864<tr>
8865<th>MDL class</th>
8866<th>Effect</th>
8867<th>Remarks</th>
8868</tr>
8869</thead>
8870<tbody>
8871<tr>
8872<td><code>mdl-textfield</code></td>
8873<td>Defines container as an MDL component</td>
8874<td>Required on &quot;outer&quot; div element</td>
8875</tr>
8876<tr>
8877<td><code>mdl-js-textfield</code></td>
8878<td>Assigns basic MDL behavior to input</td>
8879<td>Required on &quot;outer&quot; div element</td>
8880</tr>
8881<tr>
8882<td><code>mdl-textfield__input</code></td>
8883<td>Defines element as textfield input</td>
8884<td>Required on input or textarea element</td>
8885</tr>
8886<tr>
8887<td><code>mdl-textfield__label</code></td>
8888<td>Defines element as textfield label</td>
8889<td>Required on label element for input or textarea elements</td>
8890</tr>
8891<tr>
8892<td><code>mdl-textfield--floating-label</code></td>
8893<td>Applies <em>floating label</em> effect</td>
8894<td>Optional; goes on &quot;outer&quot; div element</td>
8895</tr>
8896<tr>
8897<td><code>mdl-textfield__error</code></td>
8898<td>Defines span as an MDL error message</td>
8899<td>Optional; goes on span element for MDL input element with <em>pattern</em></td>
8900</tr>
8901<tr>
8902<td><code>mdl-textfield--expandable</code></td>
8903<td>Defines a div as an MDL expandable text field container</td>
8904<td>For expandable input fields, required on &quot;outer&quot; div element</td>
8905</tr>
8906<tr>
8907<td><code>mdl-button</code></td>
8908<td>Defines label as an MDL icon button</td>
8909<td>For expandable input fields, required on &quot;outer&quot; div&#39;s label element</td>
8910</tr>
8911<tr>
8912<td><code>mdl-js-button</code></td>
8913<td>Assigns basic behavior to icon container</td>
8914<td>For expandable input fields, required on &quot;outer&quot; div&#39;s label element</td>
8915</tr>
8916<tr>
8917<td><code>mdl-button--icon</code></td>
8918<td>Defines label as an MDL icon container</td>
8919<td>For expandable input fields, required on &quot;outer&quot; div&#39;s label element</td>
8920</tr>
8921<tr>
8922<td><code>mdl-input__expandable-holder</code></td>
8923<td>Defines a container as an MDL component</td>
8924<td>For expandable input fields, required on &quot;inner&quot; div element</td>
8925</tr>
8926<tr>
8927<td><code>is-invalid</code></td>
8928<td>Defines the textfield as invalid on initial load.</td>
8929<td>Optional on <code>mdl-textfield</code> element</td>
8930</tr>
8931</tbody>
8932</table>
8933<p>(1) The &quot;search&quot; icon is used here as an example. Other icons can be used by modifying the text. For a list of available icons, see <a href="https://www.google.com/design/icons">this page</a>.</p>
8934<blockquote>
8935<p><strong>Note:</strong> Disabled versions of each text field type are provided, and are invoked with the standard HTML boolean attribute <code>disabled</code>. <code>&lt;input class=&quot;mdl-textfield mdl-js-textfield&quot; type=&quot;text&quot; disabled&gt;</code>
8936This attribute may be added or removed programmatically via scripting.</p>
8937</blockquote>
8938
8939
8940
8941 </div>
8942
8943 </div>
8944 </section>
8945 <section id="tooltips-section" class="mdl-components__page mdl-grid">
8946 <div class="mdl-cell mdl-cell--12-col">
8947 <div class="docs-text-styling component-title">
8948 <h3>Tooltips</h3>
8949 <p>Useful information on hover.</p>
8950 </div>
8951
8952
8953
8954
8955
8956
8957 <!-- Add warning, if the component has one -->
8958
8959 <!-- Generating snippets -->
8960
8961
8962
8963<div class="snippet-group">
8964
8965 <div class="snippet-header">
8966 <div class="snippet-demos">
8967 <div class="snippet-demo-padding"></div>
8968
8969
8970
8971
8972 <div class="snippet-demo">
8973 <div class="snippet-demo-container demo-tooltip demo-tooltip__tooltip-simple">
8974 <!-- Simple Tooltip -->
8975<div id="tt1" class="icon material-icons">add</div>
8976<div class="mdl-tooltip" data-mdl-for="tt1">
8977Follow
8978</div>
8979
8980 </div>
8981 </div>
8982
8983
8984
8985 <div class="snippet-demo">
8986 <div class="snippet-demo-container demo-tooltip demo-tooltip__tooltip-large">
8987 <!-- Large Tooltip -->
8988<div id="tt2" class="icon material-icons">print</div>
8989<div class="mdl-tooltip mdl-tooltip--large" for="tt2">
8990Print
8991</div>
8992
8993 </div>
8994 </div>
8995 <div class="snippet-demo-padding"></div>
8996 </div>
8997 <div class="snippet-captions">
8998 <div class="snippet-caption-padding"></div>
8999
9000 <div class="snippet-caption">
9001 Simple
9002 </div>
9003 <div class="snippet-caption">
9004 Large
9005 </div>
9006 <div class="snippet-caption-padding"></div>
9007 </div>
9008 </div>
9009 <div class="snippet-code">
9010 <pre class="language-markup codepen-button-enabled"><code id="tooltip/tooltip-simple.html">&lt;!-- Simple Tooltip --&gt;
9011&lt;div id=&quot;tt1&quot; class=&quot;icon material-icons&quot;&gt;add&lt;/div&gt;
9012&lt;div class=&quot;mdl-tooltip&quot; data-mdl-for=&quot;tt1&quot;&gt;
9013Follow
9014&lt;/div&gt;
9015</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="tooltip/tooltip-large.html">&lt;!-- Large Tooltip --&gt;
9016&lt;div id=&quot;tt2&quot; class=&quot;icon material-icons&quot;&gt;print&lt;/div&gt;
9017&lt;div class=&quot;mdl-tooltip mdl-tooltip--large&quot; for=&quot;tt2&quot;&gt;
9018Print
9019&lt;/div&gt;
9020</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
9021body {
9022 padding: 20px;
9023 background: #fafafa;
9024 position: relative;
9025}
9026&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
9027 </div>
9028</div>
9029
9030
9031
9032
9033<div class="snippet-group">
9034
9035 <div class="snippet-header">
9036 <div class="snippet-demos">
9037 <div class="snippet-demo-padding"></div>
9038
9039
9040
9041
9042 <div class="snippet-demo">
9043 <div class="snippet-demo-container demo-tooltip demo-tooltip__tooltip-rich">
9044 <!-- Rich Tooltip -->
9045<div id="tt3" class="icon material-icons">cloud_upload</div>
9046<div class="mdl-tooltip" data-mdl-for="tt3">
9047Upload <strong>file.zip</strong>
9048</div>
9049
9050 </div>
9051 </div>
9052
9053
9054
9055 <div class="snippet-demo">
9056 <div class="snippet-demo-container demo-tooltip demo-tooltip__tooltip-multiline">
9057 <!-- Multiline Tooltip -->
9058<div id="tt4" class="icon material-icons">share</div>
9059<div class="mdl-tooltip" for="tt4">
9060Share your content<br>via social media
9061</div>
9062
9063 </div>
9064 </div>
9065 <div class="snippet-demo-padding"></div>
9066 </div>
9067 <div class="snippet-captions">
9068 <div class="snippet-caption-padding"></div>
9069
9070 <div class="snippet-caption">
9071 Rich
9072 </div>
9073 <div class="snippet-caption">
9074 Multiple lines
9075 </div>
9076 <div class="snippet-caption-padding"></div>
9077 </div>
9078 </div>
9079 <div class="snippet-code">
9080 <pre class="language-markup codepen-button-enabled"><code id="tooltip/tooltip-rich.html">&lt;!-- Rich Tooltip --&gt;
9081&lt;div id=&quot;tt3&quot; class=&quot;icon material-icons&quot;&gt;cloud_upload&lt;/div&gt;
9082&lt;div class=&quot;mdl-tooltip&quot; data-mdl-for=&quot;tt3&quot;&gt;
9083Upload &lt;strong&gt;file.zip&lt;/strong&gt;
9084&lt;/div&gt;
9085</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><code id="tooltip/tooltip-multiline.html">&lt;!-- Multiline Tooltip --&gt;
9086&lt;div id=&quot;tt4&quot; class=&quot;icon material-icons&quot;&gt;share&lt;/div&gt;
9087&lt;div class=&quot;mdl-tooltip&quot; for=&quot;tt4&quot;&gt;
9088Share your content&lt;br&gt;via social media
9089&lt;/div&gt;
9090</code><div class="codepen-extra-css">&lt;style&gt;&lt;/style&gt;</div><div class="codepen-extra-css">&lt;style&gt;
9091body {
9092 padding: 20px;
9093 background: #fafafa;
9094 position: relative;
9095}
9096&lt;/style&gt;</div><form class="codepen-button" action="https://codepen.io/pen/define" method="POST" target="_blank"></form></pre>
9097 </div>
9098</div>
9099
9100
9101 <!-- Adding the demo page -->
9102
9103 <style>
9104
9105 </style>
9106
9107 <script>
9108
9109 </script>
9110
9111
9112 <div class="docs-text-styling docs-readme">
9113
9114
9115
9116
9117<h2 id="introduction">Introduction</h2>
9118<p>The Material Design Lite (MDL) <strong>tooltip</strong> component is an enhanced version of the standard HTML tooltip as produced by the <code>title</code> attribute. A tooltip consists of text and/or an image that clearly communicates additional information about an element when the user hovers over or, in a touch-based UI, touches the element. The MDL tooltip component is pre-styled (colors, fonts, and other settings are contained in <em>material.min.css</em>) to provide a vivid, attractive visual element that displays related but typically non-essential content, e.g., a definition, clarification, or brief instruction.</p>
9119<p>Tooltips are a ubiquitous feature of most user interfaces, regardless of a site&#39;s content or function. Their design and use is an important factor in the overall user experience. See the tooltip component&#39;s <a href="http://www.google.com/design/spec/components/tooltips.html">Material Design specifications page</a> for details.</p>
9120<h3 id="to-include-an-mdl-tooltip-component-">To include an MDL <strong>tooltip</strong> component:</h3>
9121<p>&nbsp;1. Code an element, such as a <code>&lt;div&gt;</code>, <code>&lt;p&gt;</code>, or <code>&lt;span&gt;</code>, and style it as desired; this will be the tooltip&#39;s target. Include an <code>id</code> attribute and unique value to link the container to its tooltip.</p>
9122<pre><code class="language-markup">&lt;p id=&quot;tt1&quot;&gt;HTML&lt;/p&gt;
9123</code></pre>
9124<p>&nbsp;2. Following the target element, code a second element, such as a <code>&lt;div&gt;</code>, <code>&lt;p&gt;</code>, or <code>&lt;span&gt;</code>; this will be the tooltip itself. Include a <code>for</code> (or <code>data-mdl-for</code>) attribute whose value matches that of the target&#39;s <code>id</code>.</p>
9125<pre><code class="language-markup">&lt;p id=&quot;tt1&quot;&gt;HTML&lt;/p&gt;
9126&lt;span for=&quot;tt1&quot;&gt;HyperText Markup Language&lt;/span&gt;
9127</code></pre>
9128<p>&nbsp;3. Add one or more MDL classes, separated by spaces, to the tooltip element using the <code>class</code> attribute.</p>
9129<pre><code class="language-markup">&lt;p id=&quot;tt1&quot;&gt;HTML&lt;/p&gt;
9130&lt;span for=&quot;tt1&quot; class=&quot;mdl-tooltip&quot;&gt;HyperText Markup Language&lt;/span&gt;
9131</code></pre>
9132<p>The tooltip component is ready for use.</p>
9133<h4 id="examples">Examples</h4>
9134<p>A target with a simple text tooltip.</p>
9135<pre><code class="language-markup">&lt;p&gt;HTML is related to but different from &lt;span id=&quot;xml&quot;&gt;&lt;i&gt;XML&lt;/i&gt;&lt;/span&gt;.&lt;/p&gt;
9136&lt;span class=&quot;mdl-tooltip&quot; for=&quot;xml&quot;&gt;eXtensible Markup Language&lt;/span&gt;
9137</code></pre>
9138<p>A target with &quot;rich&quot; (containing HTML markup) tooltip text.</p>
9139<pre><code class="language-markup">&lt;p&gt;HTML is related to but different from &lt;span id=&quot;xml&quot;&gt;&lt;i&gt;XML&lt;/i&gt;&lt;/span&gt;.&lt;/p&gt;
9140&lt;span class=&quot;mdl-tooltip&quot; for=&quot;xml&quot;&gt;e&lt;b&gt;X&lt;/b&gt;tensible &lt;b&gt;M&lt;/b&gt;arkup &lt;b&gt;L&lt;/b&gt;anguage&lt;/span&gt;
9141</code></pre>
9142<p>A target with a long text tooltip that automatically wraps.</p>
9143<pre><code class="language-markup">&lt;p&gt;HTML is related to but different from &lt;span id=&quot;xml&quot;&gt;&lt;i&gt;XML&lt;/i&gt;&lt;/span&gt;.&lt;/p&gt;
9144&lt;span class=&quot;mdl-tooltip&quot; for=&quot;xml&quot;&gt;XML is an acronym for eXtensible Markup Language&lt;/span&gt;
9145</code></pre>
9146<p>A target with tooltip text in a larger font size.</p>
9147<pre><code class="language-markup">&lt;p&gt;HTML is related to but different from &lt;span id=&quot;xml&quot;&gt;&lt;i&gt;XML&lt;/i&gt;&lt;/span&gt;.&lt;/p&gt;
9148&lt;span class=&quot;mdl-tooltip mdl-tooltip--large&quot; for=&quot;xml&quot;&gt;eXtensible Markup Language&lt;/span&gt;
9149</code></pre>
9150<p>A target with a tooltip containing both an image and text.</p>
9151<pre><code class="language-markup">&lt;p&gt;HTML is related to but different from &lt;span id=&quot;xml&quot;&gt;&lt;i&gt;XML&lt;/i&gt;&lt;/span&gt;.&lt;/p&gt;
9152&lt;span class=&quot;mdl-tooltip&quot; for=&quot;xml&quot;&gt;
9153&lt;img src=&quot;xml-logo-small.png&quot; width=&quot;20&quot; height=&quot;10&quot;&gt; eXtensible Markup Language&lt;/span&gt;
9154</code></pre>
9155<h2 id="configuration-options">Configuration options</h2>
9156<p>The MDL CSS classes apply various predefined visual enhancements to the tooltip. The table below lists the available classes and their effects.</p>
9157<table>
9158<thead>
9159<tr>
9160<th>MDL class</th>
9161<th>Effect</th>
9162<th>Remarks</th>
9163</tr>
9164</thead>
9165<tbody>
9166<tr>
9167<td><code>mdl-tooltip</code></td>
9168<td>Defines a container as an MDL tooltip</td>
9169<td>Required on tooltip container element</td>
9170</tr>
9171<tr>
9172<td><code>mdl-tooltip--large</code></td>
9173<td>Applies large-font effect</td>
9174<td>Optional; goes on tooltip container element</td>
9175</tr>
9176<tr>
9177<td><code>mdl-tooltip--left</code></td>
9178<td>Positions the tooltip to the left of the target</td>
9179<td>Optional; goes on tooltip container element</td>
9180</tr>
9181<tr>
9182<td><code>mdl-tooltip--right</code></td>
9183<td>Positions the tooltip to the right of the target</td>
9184<td>Optional; goes on tooltip container element</td>
9185</tr>
9186<tr>
9187<td><code>mdl-tooltip--top</code></td>
9188<td>Positions the tooltip to the top of the target</td>
9189<td>Optional; goes on tooltip container element</td>
9190</tr>
9191<tr>
9192<td><code>mdl-tooltip--bottom</code></td>
9193<td>Positions the tooltip to the bottom of the target</td>
9194<td>Optional; goes on tooltip container element</td>
9195</tr>
9196</tbody>
9197</table>
9198
9199
9200
9201 </div>
9202
9203 </div>
9204 </section>
9205
9206</main>
9207</div>
9208
9209
9210 </div>
9211 <section class="docs-text-styling download mdl-color--grey-800">
9212 <a href="../started/index.html#download" class="mdl-color-text--grey-50">Download Kit</a>
9213 </section>
9214 <footer class="docs-text-styling docs-footer mdl-mini-footer mdl-color--grey-900">
9215 <ul>
9216 <li class="mdl-mini-footer--social-btn">
9217 <a href="https://twitter.com/googledesign" class="social-btn social-btn__twitter" role="button" title="Twitter"></a>
9218 </li>
9219 <li class="mdl-mini-footer--social-btn">
9220 <a href="https://github.com/google/material-design-lite" class="social-btn social-btn__github" role="button" title="GitHub"></a>
9221 </li>
9222 <li class="mdl-mini-footer--social-btn">
9223 <a href="https://plus.google.com/+googledesign" class="social-btn social-btn__gplus" role="button" title="Google+"></a>
9224 </li>
9225 </ul>
9226 <ul class="docs-link-list">
9227 <li><a class="mdl-color-text--grey-600" href="https://developers.google.com/web/starter-kit/">Web Starter Kit</a></li>
9228 <li><a class="mdl-color-text--grey-600" href="https://github.com/google/material-design-lite/issues">Help</a></li>
9229 </ul>
9230 </footer>
9231 </main>
9232 </div>
9233
9234 <!-- IE Compatibility shims -->
9235 <!--[if lt IE 9]>
9236 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js""></script>
9237 <![endif]-->
9238
9239 <!--[if IE]>
9240 <script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.1.7/es5-shim.min.js"></script>
9241 <script src="//cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js"></script>
9242 <script src="//cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js"></script>
9243 <script src="//cdnjs.cloudflare.com/ajax/libs/flexie/1.0.3/flexie.min.js"></script>
9244 <link href="../assets/ie.css" rel="stylesheet">
9245 <![endif]-->
9246 <!-- end shims -->
9247
9248
9249 <!-- Material Design Lite -->
9250 <script src="../material.min.js"></script>
9251 <!-- Add Copy-to-CodePen buttons to code blocks -->
9252 <script src="../assets/codepen.js"></script>
9253 <!-- Enable Prism syntax highlighting -->
9254 <script src="../assets/prism.js"></script>
9255 <script src="../assets/prism-markup.min.js"></script>
9256 <script src="../assets/prism-javascript.min.js"></script>
9257 <script src="../assets/prism-css.min.js"></script>
9258 <script src="../assets/prism-bash.min.js"></script>
9259 <script src="../assets/main.js"></script>
9260 <!-- Built with love using Material Design Lite -->
9261 </body>
9262</html>