Skip to content
masterclass Buddy

Vue.js · Function

defineModel

defineModel() is a Vue 3.4+ <script setup> macro for component v-model. It gives the child a ref that reads and updates the parent's bound value.

Last updated

Since
3.4

Syntax

const model = defineModel<T>(options?)
const namedModel = defineModel<T>('name', options?)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • useModel()
  • v-model modifiers
  • modelValue
  • update:modelValue
  • v-model arguments

Source: Component v-model | Vue.js. Checked 2026-11-03.