nuxt-toastflow
v1.0.1
Published
Nuxt module for Toastflow — accessible, customizable toast notifications with auto-imports, SSR support, and CSS-first theming.
Maintainers
Readme
🚀 Quick Start
1. Install
pnpm add nuxt-toastflow2. Add the module
// nuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-toastflow"],
toastflow: {
config: {
position: "top-right",
duration: 5000,
},
},
});3. Toast away 🎉
<!-- app.vue -->
<script setup lang="ts">
toast.success({
title: "Saved",
description: "Your changes are live.",
});
</script>
<template>
<ToastContainer />
<NuxtPage />
</template>💡 Both
toastanduseToast()are auto-imported — no manual imports needed!
⚙️ Module Options
| Option | Type | Default | Description |
| :----------------- | :--------------------- | :----------------: | :----------------------------------------- |
| 🛠️ config | Partial<ToastConfig> | {} | Toast configuration passed to the plugin |
| 🎨 css | boolean | true | Include default styles |
| 🧱 componentName | string \| false | "ToastContainer" | Auto-registered client-only component name |
ToastContaineris auto-registered as a client-only componenttoastanduseToast()are auto-imported — use either one- Styles are injected automatically unless
css: false
📄 License
MIT — made with ❤️ by @adrianjanocko
