{{ text }}
\n\n```\n\n**Custom component:**\n```vue\n\nv-model — two-way binding.
Basic:
1<script setup>2import { ref } from "vue"3const text = ref("")4</script>56<template>7 <input v-model="text" />8 <p>{{ text }}</p>9</template>
Custom component:
1<!-- Parent -->2<MyInput v-model="text" />34<!-- Child -->5<script setup>6const model = defineModel<string>()7</script>89<template>10 <input v-model="model" />11</template>
Modifiers:
Key: v-model for two-way binding.