NanoToast

Usage in Vue

All the features of NanoToast are available in Vue too!

Installation

Using npm
npm install @iamsabbir/nanotoast

Using Yarn
yarn add @iamsabbir/nanotoast

Render a toast

<script setup>
import toast from "@iamsabbir/nanotoast";
import "@iamsabbir/nanotoast/src/styles.css"; // Ensure you import styles

const showToast = () => {
  toast.success("Hello from Vue!");
};
</script>

<template>
  <button @click="showToast">Show Toast</button>
</template>

More toast types

toast.success("Vue is awesome!");
toast.error("Vue is not awesome!");
toast.warning("Vue is okay!");
toast.info("Vue is great!");