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
10 <link rel=
"import" href=
"../polymer/polymer.html">
11 <link rel=
"import" href=
"../iron-input/iron-input.html">
12 <link rel=
"import" href=
"../iron-form-element-behavior/iron-form-element-behavior.html">
13 <link rel=
"import" href=
"paper-input-behavior.html">
14 <link rel=
"import" href=
"paper-input-container.html">
15 <link rel=
"import" href=
"paper-input-error.html">
16 <link rel=
"import" href=
"paper-input-char-counter.html">
19 `<paper-input>` is a single-line text field with Material Design styling.
21 <paper-input label="Input label"></paper-input>
23 It may include an optional error message or character counter.
25 <paper-input error-message="Invalid input!" label="Input label"></paper-input>
26 <paper-input char-counter label="Input label"></paper-input>
28 See `Polymer.PaperInputBehavior` for more API docs.
32 See `Polymer.PaperInputContainer` for a list of custom properties used to
41 <dom-module id=
"paper-input">
49 input::-webkit-input-placeholder {
50 color: var(--paper-input-container-color, --secondary-text-color);
53 input:-moz-placeholder {
54 color: var(--paper-input-container-color, --secondary-text-color);
57 input::-moz-placeholder {
58 color: var(--paper-input-container-color, --secondary-text-color);
61 input:-ms-input-placeholder {
62 color: var(--paper-input-container-color, --secondary-text-color);
69 <paper-input-container no-label-float=
"[[noLabelFloat]]" always-float-label=
"[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$=
"[[autoValidate]]" disabled$=
"[[disabled]]" invalid=
"[[invalid]]">
71 <label hidden$=
"[[!label]]">[[label]]
</label>
73 <input is=
"iron-input" id=
"input"
74 aria-labelledby$=
"[[_ariaLabelledBy]]"
75 aria-describedby$=
"[[_ariaDescribedBy]]"
76 disabled$=
"[[disabled]]"
77 bind-value=
"{{value}}"
79 prevent-invalid-input=
"[[preventInvalidInput]]"
80 allowed-pattern=
"[[allowedPattern]]"
81 validator=
"[[validator]]"
83 pattern$=
"[[pattern]]"
84 maxlength$=
"[[maxlength]]"
85 required$=
"[[required]]"
86 autocomplete$=
"[[autocomplete]]"
87 autofocus$=
"[[autofocus]]"
88 inputmode$=
"[[inputmode]]"
89 minlength$=
"[[minlength]]"
91 placeholder$=
"[[placeholder]]"
92 readonly$=
"[[readonly]]"
95 autocapitalize$=
"[[autocapitalize]]"
96 autocorrect$=
"[[autocorrect]]">
98 <template is=
"dom-if" if=
"[[errorMessage]]">
99 <paper-input-error>[[errorMessage]]
</paper-input-error>
102 <template is=
"dom-if" if=
"[[charCounter]]">
103 <paper-input-char-counter></paper-input-char-counter>
106 </paper-input-container>
121 Polymer
.IronFormElementBehavior
,
122 Polymer
.PaperInputBehavior
,
123 Polymer
.IronControlState