Helper

Vue

Optional Toaster, Vue-aware toast with VNode icons, and custom().

Live demo and install on this page. Step-by-step guide:Vue docs.

Full docsPlayground
npm i alert-notify

Try it

Same core toast API this stack uses.

Mode: success · position top-right · richColors on

Install snippet

<script setup>
import { toast, Toaster, custom } from "alert-notify/vue";
import { h } from "vue";
</script>

<template>
  <Toaster position="top-right" :rich-colors="true" />
  <button @click="toast.success('Saved')">Save</button>
  <button
    @click="
      toast.info('Pay with card', {
        icon: h('img', { src: '/card.png', alt: '' }),
      })
    "
  >
    With icon
  </button>
  <button @click="custom(h('div', 'Custom Vue content'))">Custom</button>
</template>