Skip to content

Pass porps to your custom compoonent.

expandCustomProps default is false.

  • expandCustomProps: true
<template>
  <h1>Hello {{ msg }}</h1>
</template>

<script setup lang="ts">
import { ref } from 'vue';
const msg = ref<string>('world');
</script>
  • enable globally
ts
app.use(
  Vue3Toasity,
  {
    expandCustomProps: true, // default is false
  } as ToastContainerOptions,
);
  • expandCustomProps: false
<template>
  <h1>Hello {{ msg }}</h1>
</template>

<script setup lang="ts">
import { ref } from 'vue';
const msg = ref<string>('world');
</script>

Released under the MIT License.