

Lesson 05 · 11 min
v-model on a field
You type — the ref changes. A checkbox is a boolean, not a string.
11 minLesson 5 of 8Practice includedAsk AI on any point
v-model="title" on an input is bound to const title = ref(""). It's :value + @input in one. For a checkbox, v-model writes true/false. For a select — the selected string. On your own component v-model expects the modelValue prop and emit("update:modelValue", next).
Sign in to continue
The rest of this lesson opens after sign up
The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.