Usage in Vue
All the features of NanoToast are available in Vue too!
Installation
Using npm
npm install @iamsabbir/nanotoastUsing Yarn
yarn add @iamsabbir/nanotoastRender 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!");