Installations
npm install react-native-simple-toast
Developer
vonovak
Developer Guide
Module System
CommonJS
Min. Node Version
>= 16.0.0
Typescript Support
Yes
Node Version
21.6.1
NPM Version
10.2.4
Statistics
294 Stars
102 Commits
31 Forks
3 Watching
4 Branches
11 Contributors
Updated on 21 Oct 2024
Languages
Objective-C++ (23.17%)
TypeScript (22.11%)
Java (21.12%)
Objective-C (20.17%)
Ruby (7.71%)
JavaScript (5.24%)
C (0.29%)
Swift (0.18%)
Total Downloads
Cumulative downloads
Total Downloads
4,178,214
Last day
-19.4%
3,881
Compared to previous day
Last week
3.4%
22,722
Compared to previous week
Last month
-3.2%
92,915
Compared to previous month
Last year
19.3%
1,125,344
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
2
Dev Dependencies
19
react-native-simple-toast
React Native Toast component for both Android and iOS. It just lets iOS users have the same toast experience as on Android. Using scalessec/Toast on iOS and the React Native's ToastAndroid on Android.
Summary
✅ supports both old and new architecture (RN >= 0.71 is required for new arch)
✅ extremely simple fire-and-forget api, same as ToastAndroid
✅ renders on top of Modal
s and Alert
s
✅ avoids keyboard
✅ customizable styling
Screenshots
Expand for more screenshots
Install
1yarn add react-native-simple-toast 2cd ios && pod install
then rebuild your project
Usage
the module exposes the following functions, same as ToastAndroid
, with extra configuration parameter for iOS only:
1import Toast from 'react-native-simple-toast';
2
3Toast.show(message, duration, options);
4
5Toast.showWithGravity(message, duration, gravity, options);
6
7Toast.showWithGravityAndOffset(
8 message,
9 duration,
10 gravity,
11 xOffset,
12 yOffset,
13 options,
14);
exported duration and positioning constants:
1import Toast from 'react-native-simple-toast'; 2 3Toast.LONG; 4Toast.SHORT; 5Toast.TOP; 6Toast.BOTTOM; 7Toast.CENTER;
Please note that yOffset
and xOffset
are ignored on Android 11 and above.
For customizing on iOS, you can pass an object with the following properties:
1type OptionsIOS = { 2 textColor?: ColorValue; 3 backgroundColor?: ColorValue; 4 tapToDismissEnabled?: boolean; 5};
Examples
1import Toast from 'react-native-simple-toast'; 2 3Toast.show('This is a short toast'); 4 5Toast.show('This is a long toast.', Toast.LONG); 6 7Toast.showWithGravity( 8 'This is a long toast at the top.', 9 Toast.LONG, 10 Toast.TOP, 11); 12 13Toast.show('This is a styled toast on iOS.', Toast.LONG, { 14 backgroundColor: 'blue', 15}); 16 17Toast.show('This is a toast that can be dismissed (iOS only).', Toast.LONG, { 18 tapToDismissEnabled: true, 19});
License
MIT
Made with create-react-native-library
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
binaries present in source code
Details
- Warn: binary detected: example/android/gradle/wrapper/gradle-wrapper.jar:1
Reason
Found 5/23 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/vonovak/react-native-simple-toast/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/vonovak/react-native-simple-toast/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/vonovak/react-native-simple-toast/ci.yml/master?enable=pin
- Info: 0 out of 3 GitHub-owned GitHubAction dependencies pinned
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 17 are checked with a SAST tool
Reason
11 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-cchq-frgv-rjh5
- Warn: Project is vulnerable to: GHSA-g644-9gfx-q4q4
Score
2.6
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-native-simple-toast
toastify-react-native
🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!
react-native-toast-message
Toast message component for React Native
react-native-toast-me
A real react-native simple toast message handler
react-native-root-toast
react native toast like component, pure javascript solution