paper-input
A Material Design text field
<paper-input>
<paper-input>
is a single-line text field with Material Design styling.
See: Documentation, Demo.
Usage
Installation
npm install --save @polymer/paper-input
In an html file
<html>
<head>
<script type="module">
import '@polymer/paper-input/paper-input.js';
</script>
</head>
<body>
<paper-input always-float-label label="Floating label"></paper-input>
</body>
</html>
In a Polymer 3 element
import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-input/paper-input.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<paper-input always-float-label label="Floating label"></paper-input>
`;
}
}
customElements.define('sample-element', SampleElement);
Contributing
If you want to send a PR to this element, here are the instructions for running the tests and demo locally:
Installation
git clone https://github.com/PolymerElements/paper-input
cd paper-input
npm install
npm install -g polymer-cli
Running the demo locally
polymer serve --npm
open http://127.0.0.1:<port>/demo/
Running the tests
polymer test --npm
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Dependencies
- polymer#Polymer/polymer#1.9 - 2
- iron-autogrow-textarea#PolymerElements/iron-autogrow-textarea#1 - 2
- iron-behaviors#PolymerElements/iron-behaviors#1 - 2
- iron-input#PolymerElements/iron-input#1 - 2
- paper-styles#PolymerElements/paper-styles#1 - 2
- iron-a11y-keys-behavior#PolymerElements/iron-a11y-keys-behavior#1 - 2
- iron-form-element-behavior#PolymerElements/iron-form-element-behavior#1 - 2
- Released
- 2018-06-22
- Maturity
- IMPORTED
- License
- Other
Compatibility
- Framework
- Polymer 2.0+
- Polymer 1.0+ in 0.8.0
- Polymer 3.0+ in 0.0.1
- Browser
- Browser Independent