Appearance
Inputs and forms 
Most form elements (unless noted) work just like normal input elements.
Custom Element 
- You may set initial value via either - valueattribute or proprertyhtml- <!-- via attribute --> <phi-input value="initial value" />html- <!-- via property (with Vue.js) --> <phi-input :value="'initial value'" />
- You may get current value from - valuepropertyjs- const alertValue = () => alert(input.value);
- You may update input value via - valuepropertyjs- const resetValue = () => input.value = "";- Once you update - valueproperty from outside, setting- valueattribute no longer updates- valueproperty value.
- You may subscribe - inputevent to watch user inputhtml- <phi-input oninput="handleInput" />js- input.addEventListener("input", handleInput);
- You may put - nameattribute to integrate with the enclosing- <form>elementhtml- <form method="POST"> <phi-input name="field_name" /> <input type="submit" value="Send" /> </form>- Note that non-string values are serialized as follows on submit. - JS value type - Form value - null- ""(empty string)- boolean- 1or- 0- number- number.toString()- array- comma-separated string - object- FormData
as Preact component 
- Use - valueprop to set value, and- onChangeto subscribe changes as usualjs- const Demo = () => { const [value, setValue] = useState(""); return <Input value={ value } onChange={ setValue } />; };