Skip to content

sonner-next-intl

Strongly typed translated toasts for modern Next.js apps.

This wrapper integrates Sonner (toast notifications) with next-intl (internationalization) to provide:

  • 🔒 Fully typed translation keys for toast messages
  • 🌐 Automatic next-intl translation resolution
  • 🧩 Optional namespace scoping with notificationsRoot
  • ⚡ Drop-in Sonner compatibility (same API — translated!)

Use it in Next.js 15+ App Router projects to keep notifications clean, localized, and type‑safe.






Install & setup

Learn how to install the wrapper and connect it to your next-intl provider.

Create your typed hook

See how to define useTranslatedToast once for your project.

Use translated toasts

Explore examples for success, error, loading, rich messages, and promises.

Namespace your notifications

Use notificationsRoot to keep translation keys clean and consistent.

See API reference

Understand the wrapper’s types, interfaces, and toast method behavior.