controlled input
A controlled input gets its current value from application state.
Use this when A form’s displayed value and submitted value disagree.
without the term
“The text field shows one thing but when I submit, a different value gets sent, and sometimes the cursor jumps to the end while typing. Can you make the form input reliable?”
with the term · How do you ask a model for controlled input?
Make this input consistently controlled by local draft state. Verify typing, reset, and submission without cursor jumps or lost edits.
What is controlled input?
The input displays the value held in state, and every keystroke updates that state. One owner holds the draft, so the displayed and submitted values cannot differ.
Why does controlled input matter when vibe coding?
An agent may mix default values, state ownership, and delayed updates.
How do you do controlled input?
Choose an owner for the draft and test typing, reset, and submission.
What goes wrong with controlled input?
Waiting for a server response before updating the local typing state.