Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
toastify-react-native
Advanced tools
🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!
🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!
$ npm install toastify-react-native
import React from "react";
import { StyleSheet, View, TouchableOpacity, Text } from "react-native";
import ToastManager, { Toast } from "toastify-react-native";
import Another from "./Another";
const App = () => {
const showToasts = () => {
Toast.success("Promised is resolved");
};
return (
<View style={styles.container}>
<ToastManager />
<Another />
<TouchableOpacity
onPress={showToasts}
style={{
backgroundColor: "white",
borderColor: "green",
borderWidth: 1,
padding: 10,
}}
>
<Text>SHOW SOME AWESOMENESS!</Text>
</TouchableOpacity>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});
export default App;
import React from "react";
import { StyleSheet, View, TouchableOpacity, Text } from "react-native";
import { Toast } from "toastify-react-native";
const Another = () => (
<View style={styles.container}>
<TouchableOpacity onPress={() => Toast.info("Lorem ipsum info", "bottom")} style={styles.buttonStyle}>
<Text>SHOW SOME AWESOMENESS!</Text>
</TouchableOpacity>
</View>
);
const styles = StyleSheet.create({
container: {
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
buttonStyle: {
marginTop: 10,
backgroundColor: "white",
borderColor: "green",
borderWidth: 2,
padding: 10,
},
});
export default Another;
For a more complex example take a look at the /example
directory.
Name | Type | Default | Description |
---|---|---|---|
width | number or 'auto' | 256 | Width of toast |
height | number or 'auto' | 68 | Height of the toast |
style | any | null | Style applied to the toast |
textStyle | any | null | Style applied to the toast content |
position | top, center or bottom | top | Position of toast |
positionValue | number | 50 | position value of toast |
duration | number | 3000 | The display time of toast. |
animationStyle | upInUpOut, rightInOut or zoomInOut | upInUpOut | The animation style of toast |
animationIn | string or object | 'slideInRight' | Toast show animation |
animationOut | string or object | 'slideOutLeft' | Toast hide animation |
animationInTiming | number | 300 | Timing for the Toast show animation (in ms) |
animationOutTiming | number | 300 | Timing for the toast hide animation (in ms) |
backdropTransitionInTiming | number | 300 | The backdrop show timing (in ms) |
backdropTransitionOutTiming | number | 300 | The backdrop hide timing (in ms) |
hasBackdrop | bool | false | Render the backdrop |
backdropColor | string | 'black' | The backdrop background color |
backdropOpacity | number | 0.2 | The backdrop opacity when the toast is visible |
showCloseIcon | boolean | true | Shows the close icon in the right corner |
showProgressBar | boolean | true | Shows the progress bar in the toast |
Take a look at react-native-animatable to see the dozens of animations available out-of-the-box.
Pull requests, feedbacks and suggestions are welcome!
toastify-react-native is MIT licensed .
FAQs
🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!
The npm package toastify-react-native receives a total of 659,190 weekly downloads. As such, toastify-react-native popularity was classified as popular.
We found that toastify-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.