Toastflow
Playground
Nuxt

Nuxt Module Options

Configure the Nuxt wrapper without guessing what belongs in nuxt.config.

nuxt-toastflow adds Nuxt-specific wiring around the shared Toastflow config.

OptionDefaultUse it for
config{}Shared Toastflow runtime config
csstrueToggle shipped CSS injection
componentName"ToastContainer"Rename or disable the auto-registered container
componentstrueAuto-register the remaining components (Toast, icons, …)

Full Example

nuxt.config.ts
export default defineNuxtConfig({
  modules: ["nuxt-toastflow"],
  toastflow: {
    css: true,
    componentName: "ToastContainer",
    config: {
      position: "top-right",
      alignment: "left",
      duration: 5000,
      maxVisible: 5,
      queue: true,
      pauseOnHover: true,
    },
  },
});

Option Details

JSON-Serializable Config

Do not put functions in toastflow.config. Nuxt config is serialized. Use per-toast callbacks like onClose, onClick, or button onClick at runtime.
runtime/toast.ts
toast.success({
  title: "Saved",
  onClose() {
    console.log("toast closed");
  },
});

Runtime exports

Import ToastContainer, Toast, toast, types, or lower-level runtime pieces explicitly.

Nuxt notes

Client-only usage, SSR boundaries, and practical app patterns.
Copyright © 2026