1.0.8 • Published 3 years ago

jcb-input v1.0.8

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

Install

npm install jcb-input

Usage example

parcel index.html

index.html

<!DOCTYPE html>
<body>
   <jcb-input
      id="phone-input"
      type="text"
      name="phone"
      label="Téléphone mobile"
      placeholder="Ex : 06 50 90 04 72"
      value="123"
      error-message="Invalid phone number"
   ></jcb-input>
</body>

<script>
   import 'jcb-input'
   import "@fontsource/roboto/300.css"

   const phoneInput = document.getElementById('phone-input')
   // phoneInput.value = "234"

   phoneInput.addEventListener('input', event => {
      console.log('input', event.target.value)
   })
</script>

<style>
:root {
   font-family: "Roboto";
   font-weight: 300;
}
</style>

API references

jcb-input

Attributes

NameTypeDefaultDescription
typeString''
nameString''
labelString''
valueString''entered text
error-messageString''error message

Events

NameDescriptionValue
inputEmitted whenever text is changed

CSS variables

NameDefaultDescription
--jcb-input-xxxxxxxxx
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.2

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago