Quiz Entry - updated: 2026.07.05
How does two-way binding work with v-model?
With v-model, changes flow both ways: typing in the input updates the data, and changing the data updates the input.
<input v-model="name">
<button v-on:click="name = ''">Reset</button>
<p>Hallo {{ name }}</p>
When the user types → name property updates → paragraph updates
When Reset is clicked → name becomes empty → input clears AND paragraph updates
This eliminates manual DOM manipulation - just change the data!
Go deeper:
Form Input Bindings (Vue docs) —
v-modelacross inputs, checkboxes, radios, and selects, plus.lazy/.number/.trimmodifiers.