OLD | NEW |
| (Empty) |
1 <!-- | |
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.g
ithub.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/CONTRI
BUTORS | |
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/PATEN
TS | |
8 --><!-- | |
9 | |
10 Material Design: <a href="http://www.google.com/design/spec/components/text-fiel
ds.html#text-fields-single-line-text-field">Single line text field</a> | |
11 | |
12 `paper-input` is a single-line text field for user input. It is a convenience el
ement composed of | |
13 a `paper-input-decorator` and a `input is="core-input"`. | |
14 | |
15 Example: | |
16 | |
17 <paper-input label="Your Name"></paper-input> | |
18 | |
19 If you need more control over the `input` element, use `paper-input-decorator`. | |
20 | |
21 Theming | |
22 ------- | |
23 | |
24 `paper-input` can be styled similarly to `paper-input-decorator`. | |
25 | |
26 Form submission | |
27 --------------- | |
28 | |
29 Unlike inputs using `paper-input-decorator` directly, `paper-input` does not wor
k out of | |
30 the box with the native `form` element. This is because the native `form` is not
aware of | |
31 shadow DOM and does not treat `paper-input` as a form element. | |
32 | |
33 Use `paper-input-decorator` directly, or see | |
34 <a href="https://github.com/garstasio/ajax-form">`ajax-form`</a> for a possible
solution | |
35 to submitting a `paper-input`. | |
36 | |
37 Validation | |
38 ---------- | |
39 | |
40 Use `paper-input-decorator` if you would like to implement validation. | |
41 | |
42 @group Paper Elements | |
43 @element paper-input | |
44 @homepage github.io | |
45 --><html><head><link href="../polymer/polymer.html" rel="import"> | |
46 <link href="../core-input/core-input.html" rel="import"> | |
47 | |
48 <link href="paper-input-decorator.html" rel="import"> | |
49 | |
50 </head><body><polymer-element name="paper-input" assetpath=""> | |
51 | |
52 <template> | |
53 | |
54 <style> | |
55 :host { | |
56 display: inline-block; | |
57 } | |
58 </style> | |
59 | |
60 <paper-input-decorator id="decorator" label="{{label}}" floatinglabel="{{float
ingLabel}}" value="{{value}}" disabled?="{{disabled}}"> | |
61 <input is="core-input" value="{{value}}" committedvalue="{{committedValue}}"
on-change="{{changeAction}}" disabled?="{{disabled}}"> | |
62 </paper-input-decorator> | |
63 | |
64 </template> | |
65 | |
66 | |
67 | |
68 </polymer-element> | |
69 <script charset="utf-8" src="paper-input-extracted.js"></script></body></html> | |
OLD | NEW |