
Polymer - Paper Input
Paper-input is a text field combined with styling. To get paper-input in your directory in working condition, you should run the following command in the command prompt.
bower install --save PolymerElements/paper-input
Example
Your index.html file should look like the following.
<!doctype html> <html> <head> <link rel = 'import' href = 'my-app.html'> </head> <body> <my-app></my-app> </body> </html>
Your my-app.html file should look like the following.
<link rel = 'import' href = 'bower_components/polymer/polymer.html'> <link rel = "import" href="bower_components/iron-icons/iron-icons.html"> <link rel = "import" href = "bower_components/paper-input/paper-input.html"> <dom-module id = 'my-app'> <template> <style> paper-input { max-width: 300px; } </style> <h3>Paper-Input Example </h3> <paper-input label = "User Name"> <iron-icon icon = "account-circle" prefix></iron-icon> </paper-input> <paper-input label = "Password"> <iron-icon icon = "lock-outline" prefix></iron-icon> </paper-input> </template> <script> Polymer ({ is: 'my-app', ready: function() { this.async(function() { }); } }); </script> </dom-module>
Output
Refresh the Polymer server and following will be the output.

polymer_elements.htm
Advertisements