pseudoinput
v0.0.3
Published
a pseudo input element with block cursor
Downloads
3
Readme
pseudoInput
a toy <input />
install
npm install pseudoinput
<script src="pseudoinput.umd.js"></script
Usage
const Input = PseudoInput("wrappId"[, option ]);
Input.value // get value
Input.value = "Hello world" // set value
Input.onChange = (val) => {/* do something with val */}
Input.onEnter = (val) => {/* do something with val */}
Option
option.color
text coloroption.backgroundColor
background coloroption.cursorColor
cursor coloroption.fontSize
font sizeoption.disableAutoFocus
if set true, you need callInput.focus()
then input