Skip to content

Remove toast programmatically

An id is returned each time you display a toast, use it to remove a given toast programmatically by calling toast.remove(toastId)


If you call toast.remove without argument, all the displayed toasts will be removed.

  <h1>Hello {{ msg }}</h1>

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

Released under the MIT License.