📅  最后修改于: 2023-12-03 15:33:43.824000             🧑  作者: Mango
Polimer Paper Input is a Polymer element that provides a material design text input with floating label and other features. This element is part of the Polimer Paper element set, which consists of a collection of Material Design-inspired UI components built using web components and Polymer.
First, import the Polymer element:
<link rel="import" href="../bower_components/paper-input/paper-input.html">
Then, use the element in your HTML:
<paper-input label="Username"></paper-input>
<paper-input label="Username" value="{{username}}"
char-counter char-counter-length="20"
required auto-validate error-message="Username is required"></paper-input>
This example creates an input with the label "Username", with a maximum character count of 20 and is required. It also enables auto validation, and displays an error message when the input is invalid.
Polimer Paper Input element provides a lot of features to create material design input fields easily. It is easy to use and customize, and it is a great addition to any Polymer project.