2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS
5 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
11 Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Buttons</a>
13 `paper-icon-button` is a button with an image placed at the center. When the user touches
14 the button, a ripple effect emanates from the center of the button.
16 `paper-icon-button` includes a default icon set. Use `icon` to specify which icon
17 from the icon set to use.
19 <paper-icon-button icon="menu"></paper-icon-button>
21 See [`core-iconset`](#core-iconset) for more information about
22 how to use a custom icon set.
26 <link href="path/to/core-icons/core-icons.html" rel="import">
28 <paper-icon-button icon="favorite"></paper-icon-button>
29 <paper-icon-button src="star.png"></paper-icon-button>
34 Style the button with CSS as you would a normal DOM element. If you are using the icons
35 provided by `core-icons`, they will inherit the foreground color of the button.
37 /* make a red "favorite" button */
38 <paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
40 By default, the ripple is the same color as the foreground at 25% opacity. You may
41 customize the color using this selector:
43 /* make #my-button use a blue ripple instead of foreground color */
44 #my-button::shadow #ripple {
48 The opacity of the ripple is not customizable via CSS.
53 The button is accessible by default if you use the `icon` property. By default, the
54 `aria-label` attribute will be set to the `icon` property. If you use a custom icon,
55 you should ensure that the `aria-label` attribute is set.
57 <paper-icon-button src="star.png" aria-label="star"></paper-icon-button>
59 @element paper-icon-button
60 @extends paper-button-base
62 --><html><head><link href=
"../polymer/polymer.html" rel=
"import">
63 <link href=
"../core-icon/core-icon.html" rel=
"import">
64 <link href=
"../core-icons/core-icons.html" rel=
"import">
65 <link href=
"../paper-button/paper-button-base.html" rel=
"import">
66 <link href=
"../paper-ripple/paper-ripple.html" rel=
"import">
68 </head><body><polymer-element name=
"paper-icon-button" extends=
"paper-button-base" attributes=
"src icon" role=
"button" assetpath=
"">
74 display: inline-block;
78 -webkit-user-select: none;
79 -moz-user-select: none;
80 -ms-user-select: none;
103 <!-- to position to ripple behind the icon -->
104 <core-icon relative=
"" id=
"icon" src=
"{{src}}" icon=
"{{icon}}"></core-icon>
111 <script src=
"paper-icon-button-extracted.js"></script></body></html>