• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!doctype html>
2<!--
3@license
4Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8Code distributed by Google as part of the polymer project is also
9subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10-->
11<html>
12<head>
13
14  <meta charset="utf-8">
15  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
16  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
17
18  <title>paper-fab demo</title>
19
20  <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
21  <link rel="import" href="../../paper-styles/color.html">
22  <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
23  <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
24  <link rel="import" href="../../iron-icons/iron-icons.html">
25  <link rel="import" href="../paper-fab.html">
26
27  <style is="custom-style" include="demo-pages-shared-styles">
28    paper-fab {
29      margin-left: 10px;
30      margin-right: 10px;
31    }
32
33    .vertical-section-container {
34      max-width: 550px;
35    }
36  </style>
37</head>
38<body unresolved>
39  <div class="vertical-section-container centered">
40    <h3>FABs can be enabled or disabled</h3>
41    <demo-snippet class="centered-demo">
42      <template>
43        <style>
44          paper-fab.label {
45            font-size: 20px;
46          }
47        </style>
48        <paper-fab icon="favorite" title="heart"></paper-fab>
49        <paper-fab disabled icon="reply" title="reply"></paper-fab>
50        <paper-fab class="label" label="��" title="heart eyes cat"></paper-fab>
51      </template>
52    </demo-snippet>
53
54    <h3>FABs can be made smaller using the <i>mini</i> attribute</h3>
55    <demo-snippet class="centered-demo">
56      <template>
57        <paper-fab mini icon="favorite" title="heart"></paper-fab>
58        <paper-fab mini disabled icon="reply" title="reply"></paper-fab>
59        <paper-fab mini class="label" label="��" title="heart eyes cat"></paper-fab>
60      </template>
61    </demo-snippet>
62
63    <h3>FABs can hide the ripple effect using the <i>noink</i> attribute</h3>
64    <demo-snippet class="centered-demo">
65      <template>
66        <paper-fab noink icon="favorite" title="heart"></paper-fab>
67      </template>
68    </demo-snippet>
69
70    <h3>FABs can be styled using custom properties</h3>
71    <demo-snippet class="centered-demo">
72      <template>
73        <style is="custom-style">
74          paper-fab.blue {
75            --paper-fab-background: var(--paper-light-blue-500);
76            --paper-fab-keyboard-focus-background: var(--paper-light-blue-900);
77          }
78          paper-fab.orange {
79            --paper-fab-background: var(--paper-orange-500);
80            --paper-fab-keyboard-focus-background: var(--paper-orange-900);
81          }
82        </style>
83
84        <paper-fab icon="favorite" title="heart" class="blue"></paper-fab>
85        <paper-fab icon="favorite" title="heart" class="orange"></paper-fab>
86      </template>
87    </demo-snippet>
88  </div>
89</body>
90</html>
91