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)

DANGER

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

<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.