FAQ
Why do I get RaytolfasToastify is not defined?
Ensure you included the UMD script in your HTML:
<script src="node_modules/@raytolfas/toastify/dist/raytolfas-toastify.umd.js"></script>
Run the build command to generate the UMD bundle:
npm run build
Check that the file exists in dist/raytolfas-toastify.umd.js.
How to fix Export declaration conflicts with exported declaration of 'ToastOptions'?
In toastify.ts, ensure ToastOptions is exported only as a type:
export { toast };
export type { ToastOptions };
This avoids TypeScript error ts(2484).
Can I use @raytolfas/toastify without React?
Yes, use the UMD bundle for pure JavaScript/HTML or ES modules for modern frameworks like Vite or Next.js. See HTML Example for details.
How do I customize the progress bar or pause-on-hover behavior?
Override the CSS in toastify.css for the progress bar (.toast-progress) or modify the hover event listeners in toastify.ts. See Styling.
Back to Introduction.