An opinionated toast component for React Native. A port of @emilkowalski's sonner.
See the codeAn opinionated toast component for React Native. A port of @emilkowalski's sonner.
success, error, warning, custom, promisehttps://snack.expo.dev/@gunnartorfis/sonner-native
npx expo install sonner-native
To use this package, you also need to install its peer dependencies. Check out their documentation for more information:
import { Toaster } from 'sonner-native';
function App() {
return (
<View>
<NavigationContainer>...</NavigationContainer>
<Toaster />
</View>
);
}
When using Expo Router, place the Toaster component in your root layout file (app/_layout.tsx):
import { Toaster } from 'sonner-native';
import { Stack } from 'expo-router';
import { GestureHandlerRootView } from "react-native-gesture-handler";
export default function RootLayout() {
return (
<GestureHandlerRootView>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="+not-found" />
</Stack>
<Toaster />
</GestureHandlerRootView>
);
}
This ensures the toasts will be displayed across all screens in your app.
import { toast } from 'sonner-native';
function SomeComponent() {
return (
<Button
title="Show Toast"
onPress={() => toast('Hello, World!')}
/>
);
}
Even though Sonner Native works on the web, it is not recommended to use it there. Instead, use the original Sonner.
The following setup is recommended. Add a sonner.ts and sonner.web.ts file to your project and import from there instead of from this library directly. That way, sonner will be used on the web and sonner-native on native.
// sonner.ts
export * from 'sonner-native';
// sonner.web.ts
export * from 'sonner';
For more advanced usage, check out the documentation
https://github.com/user-attachments/assets/ccc428ca-37c3-4589-9e8c-f414c40d764c
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
7,102 followers · starred Sep 2025
1,186 followers · starred Mar 2025
89 followers · starred Sep 2024
62 followers · starred Jan 2026
An opinionated toast component for React Native. A port of @emilkowalski's sonner.
See the codeAn opinionated toast component for React Native. A port of @emilkowalski's sonner.
success, error, warning, custom, promisehttps://snack.expo.dev/@gunnartorfis/sonner-native
npx expo install sonner-native
To use this package, you also need to install its peer dependencies. Check out their documentation for more information:
import { Toaster } from 'sonner-native';
function App() {
return (
<View>
<NavigationContainer>...</NavigationContainer>
<Toaster />
</View>
);
}
When using Expo Router, place the Toaster component in your root layout file (app/_layout.tsx):
import { Toaster } from 'sonner-native';
import { Stack } from 'expo-router';
import { GestureHandlerRootView } from "react-native-gesture-handler";
export default function RootLayout() {
return (
<GestureHandlerRootView>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="+not-found" />
</Stack>
<Toaster />
</GestureHandlerRootView>
);
}
This ensures the toasts will be displayed across all screens in your app.
import { toast } from 'sonner-native';
function SomeComponent() {
return (
<Button
title="Show Toast"
onPress={() => toast('Hello, World!')}
/>
);
}
Even though Sonner Native works on the web, it is not recommended to use it there. Instead, use the original Sonner.
The following setup is recommended. Add a sonner.ts and sonner.web.ts file to your project and import from there instead of from this library directly. That way, sonner will be used on the web and sonner-native on native.
// sonner.ts
export * from 'sonner-native';
// sonner.web.ts
export * from 'sonner';
For more advanced usage, check out the documentation
https://github.com/user-attachments/assets/ccc428ca-37c3-4589-9e8c-f414c40d764c
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
7,102 followers · starred Sep 2025
1,186 followers · starred Mar 2025
89 followers · starred Sep 2024
62 followers · starred Jan 2026