SonnerNextIntlProvider
SonnerNextIntlProvider<
M>(props):Element
Defined in: packages/sonner-next-intl/src/context.tsx:98
Provider component that wires sonner plus next-intl translator into the
React context for descendant components to consume via useConfig.
The component expects the full context shape as props. This design keeps the
provider API explicit and simple: you pass a toast implementation, the
messages object for the current locale and a translator instance.
Type Parameters
Section titled “Type Parameters”M extends Record<string, any>
The shape of the messages object for translations.
Parameters
Section titled “Parameters”object & ContextType<M>
Props for the provider.
Returns
Section titled “Returns”Element
The provider wrapping the children.
Example
Section titled “Example”<SonnerNextIntlProvider toast={toast} messages={messages} translator={translator}> <App /></SonnerNextIntlProvider>