Skip to content

Glossary: Vue.js

defineProps

A compiler macro in `<script setup>` that declares which props a component accepts, optionally with `type`, `required` and `default`. It needs no import.

Where the book teaches it

Related terms

PropdefineEmitsCompiler macro