Basic
The smallest complete setup: register the module and trigger a toast from a button. There’s nothing to mount and no stylesheet to import.
1. Register the module
Section titled “1. Register the module”export default defineNuxtConfig({ modules: ['nuxt-toastify'],})No options are required — the built-in defaults give you a top-right toast that auto-dismisses after 5 seconds with a progress bar.
2. Fire a toast
Section titled “2. Fire a toast”<script setup lang="ts">function save() { useToastify.success('Saved successfully!')}</script>
<template> <button @click="save">Save</button></template>Click the button and a green success toast slides in from the top-right, then disappears on its own a few seconds later.
Multiple types
Section titled “Multiple types”Each type helper gives you the matching color and icon:
<script setup lang="ts">function demo() { useToastify.success('Profile updated') useToastify.info('Syncing in the background…') useToastify.warning('Storage almost full') useToastify.error('Could not reach the server')}</script>
<template> <button @click="demo">Show all types</button></template>Next steps
Section titled “Next steps”- Positioning — move toasts to a different corner and tune their duration.
- Custom Styling — themes, transitions, custom classes, and HTML content.