项目作者: nayyaung9

项目描述 :
Custom HTML input tag
高级语言: JavaScript
项目地址: git://github.com/nayyaung9/paper-input.git
创建时间: 2019-10-24T04:04:05Z
项目社区:https://github.com/nayyaung9/paper-input

开源协议:

下载


paper-input

Component’s features


  • Placeholder

  • name

  • fullwidth

  • type

  • required

  • disabled

  • value

  • autofocus

  • margin

  • className

  • variant

How to use it

  1. npm i hyper-paper-input

directory တစ်ခုဆောက်ပြီး terminal ‌ကနေ hyper-paper-input ကို install လုပ်လိုက်ပါ။
index.html ဆောက်ပြီး script tag နဲ့ paper-input.js ကို ချိတ်လိုက်ပါ။

  1. -/node_modules
  2. -index.html

index.html

  1. <body>
  2. ...
  3. <script src='./node_modules/hyper-paper-input/paper-input.js'></script>
  4. </body>
  1. <body>
  2. <paper-input></paper-input>
  3. <script src='./node_modules/hyper-paper-input/paper-input.js'></script>
  4. </body>

Result

features

  • Placeholder
  • name
  1. <paper-input
  2. placeholder="first name"
  3. name="first-name"
  4. ></paper-input>

name attribute လေးက input ရဲ့ နာမည်သတ်မှတ်တဲ့အခါ သုံးပါတယ်။

  • fullwidth

fullwidth ပေးလိုက်ရင် သူ့ parent container ရဲ့ width ရှိသလောက် နေရာ ယူသွားပါလိမ့်မယ်။

  1. <div class="container">
  2. <paper-input fullwidth></paper-input>
  3. </div>

Example

  1. <paper-input
  2. placeholder="Email"
  3. type="email"
  4. required
  5. ></paper-input>
  1. <div class="container">
  2. <paper-input
  3. placeholder="Email"
  4. type="email"
  5. required
  6. margin
  7. fullwidth
  8. ></paper-input>
  9. <paper-input
  10. placeholder="Password"
  11. type="password"
  12. required
  13. margin
  14. fullwidth
  15. ></paper-input>
  16. </div>

  • variant
  1. <div class="container">
  2. <paper-input
  3. placeholder="Email"
  4. type="email"
  5. required
  6. margin
  7. fullwidth
  8. variant="outlined"
  9. ></paper-input>
  10. <paper-input
  11. placeholder="Password"
  12. type="password"
  13. required
  14. margin
  15. fullwidth
  16. variant="outlined"
  17. ></paper-input>
  18. </div>

Challenging of hyper-paper-input

  • Component features
  • Styling custom CSS into Component
  • CDN link for Component
  • Input animations

@github/nayyaung9