3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9 --><html><head><link rel=
"import" href=
"../polymer/polymer.html">
10 <link rel=
"import" href=
"../iron-input/iron-input.html">
11 <link rel=
"import" href=
"../iron-form-element-behavior/iron-form-element-behavior.html">
12 <link rel=
"import" href=
"paper-input-behavior.html">
13 <link rel=
"import" href=
"paper-input-container.html">
14 <link rel=
"import" href=
"paper-input-error.html">
15 <link rel=
"import" href=
"paper-input-char-counter.html">
18 `<paper-input>` is a single-line text field with Material Design styling.
20 <paper-input label="Input label"></paper-input>
22 It may include an optional error message or character counter.
24 <paper-input error-message="Invalid input!" label="Input label"></paper-input>
25 <paper-input char-counter label="Input label"></paper-input>
27 It can also include custom prefix or suffix elements, which are displayed
28 before or after the text input itself. In order for an element to be
29 considered as a prefix, it must have the `prefix` attribute (and similarly
32 <paper-input label="total">
34 <paper-icon-button suffix icon="clear"></paper-icon-button>
37 See `Polymer.PaperInputBehavior` for more API docs.
41 See `Polymer.PaperInputContainer` for a list of custom properties used to
50 </head><body><dom-module id=
"paper-input">
58 input::-webkit-input-placeholder {
59 color: var(--paper-input-container-color, --secondary-text-color);
62 input:-moz-placeholder {
63 color: var(--paper-input-container-color, --secondary-text-color);
66 input::-moz-placeholder {
67 color: var(--paper-input-container-color, --secondary-text-color);
70 input:-ms-input-placeholder {
71 color: var(--paper-input-container-color, --secondary-text-color);
75 <paper-input-container no-label-float=
"[[noLabelFloat]]" always-float-label=
"[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$=
"[[autoValidate]]" disabled$=
"[[disabled]]" invalid=
"[[invalid]]">
77 <content select=
"[prefix]"></content>
79 <label hidden$=
"[[!label]]">[[label]]
</label>
81 <input is=
"iron-input" id=
"input" aria-labelledby$=
"[[_ariaLabelledBy]]" aria-describedby$=
"[[_ariaDescribedBy]]" disabled$=
"[[disabled]]" bind-value=
"{{value}}" invalid=
"{{invalid}}" prevent-invalid-input=
"[[preventInvalidInput]]" allowed-pattern=
"[[allowedPattern]]" validator=
"[[validator]]" type$=
"[[type]]" pattern$=
"[[pattern]]" required$=
"[[required]]" autocomplete$=
"[[autocomplete]]" autofocus$=
"[[autofocus]]" inputmode$=
"[[inputmode]]" minlength$=
"[[minlength]]" maxlength$=
"[[maxlength]]" min$=
"[[min]]" max$=
"[[max]]" step$=
"[[step]]" name$=
"[[name]]" placeholder$=
"[[placeholder]]" readonly$=
"[[readonly]]" list$=
"[[list]]" size$=
"[[size]]" autocapitalize$=
"[[autocapitalize]]" autocorrect$=
"[[autocorrect]]" on-change=
"_onChange">
83 <content select=
"[suffix]"></content>
85 <template is=
"dom-if" if=
"[[errorMessage]]">
86 <paper-input-error>[[errorMessage]]
</paper-input-error>
89 <template is=
"dom-if" if=
"[[charCounter]]">
90 <paper-input-char-counter></paper-input-char-counter>
93 </paper-input-container>
98 <script src=
"paper-input-extracted.js"></script></body></html>