Gathering detailed insights and metrics for sonner-native
Gathering detailed insights and metrics for sonner-native
An opinionated toast component for React Native. A port of @emilkowalski's sonner.
npm install sonner-native
Typescript
Module System
Node Version
NPM Version
TypeScript (97.72%)
JavaScript (2.19%)
CSS (0.09%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
94,057
Last Day
1,037
Last Week
6,042
Last Month
26,404
Last Year
94,057
569 Stars
286 Commits
19 Forks
2 Watching
5 Branches
12 Contributors
Minified
Minified + Gzipped
Latest Version
0.17.0
Package Id
sonner-native@0.17.0
Unpacked Size
279.33 kB
Size
50.48 kB
File Count
159
NPM Version
10.2.4
Node Version
20.11.0
Publised On
04 Feb 2025
Cumulative downloads
Total Downloads
Last day
-18.3%
1,037
Compared to previous day
Last week
-13.6%
6,042
Compared to previous week
Last month
36.3%
26,404
Compared to previous month
Last year
0%
94,057
Compared to previous year
7
23
An opinionated toast component for React Native. A port of @emilkowalski's sonner.
success
, error
, warning
, custom
, promise
https://snack.expo.dev/@gunnartorfis/sonner-native
1npx expo install sonner-native
To use this package, you also need to install its peer dependencies. Check out their documentation for more information:
1import { Toaster } from 'sonner-native'; 2 3function App() { 4 return ( 5 <View> 6 <NavigationContainer>...</NavigationContainer> 7 <Toaster /> 8 </View> 9 ); 10}
1import { toast } from 'sonner-native'; 2 3function SomeComponent() { 4 return ( 5 <Button 6 title="Show Toast" 7 onPress={() => toast('Hello, World!')} 8 /> 9 ); 10}
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.
1// sonner.ts 2export * from 'sonner-native';
1// sonner.web.ts 2export * 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
No vulnerabilities found.
No security vulnerabilities found.