Skip to content
On this page

exportProps

Stability: experimental ⚠️ Experimental feature, use at your risk

Svelte-like Declaring props for Vue.

FeaturesSupported
Vue 3
Nuxt 3
Vue 2
Volar Plugin

Usage

Using export syntax to declare props.

vue
<script setup lang="ts">
export let foo: string
export const bar: number = 1 // with default value
</script>