jcb-input
1.0.8 • Public • Published
npm install jcb-input
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>
Name |
Type |
Default |
Description |
type |
String |
'' |
|
name |
String |
'' |
|
label |
String |
'' |
|
value |
String |
'' |
entered text |
error-message |
String |
'' |
error message |
Name |
Description |
Value |
input |
Emitted whenever text is changed |
|
Name |
Default |
Description |
--jcb-input-xxx |
xxx |
xxx |
Package Sidebar
Install
Weekly Downloads