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.
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>- Toaster is optional. It only syncs config props.
- Import toast from alert-notify/vue for VNode icons.
- custom() accepts Vue VNodes.
- Peer: vue >= 3.