v-model creates two-way binding between a form input and a piece of state: the input shows the state's value, and editing the input updates the state — automatically, in both directions.
<script setup>
import { ref } from "vue";
const name = ref("");
</script>
<template>
<input v-model="name" />
<p>You typed: {{ name }}</p> <!-- updates live as you type -->
</template>
It's syntactic sugar
Under the hood, combines a bind and an listener:
