
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-irano
Advanced tools
A customizable cross-platform toast notification library for React Native.
You can watch a demonstration of the React Native Irano components in action below:
To use the React Native Irano components, ensure you have the following dependencies installed in your React Native project. You can use one of the following commands based on your package manager:
npm install react-native-irano
# or
yarn add react-native-irano
React Native Irano is a library that provides customizable alert and toast components for React Native applications. It allows developers to easily display notifications and alerts with smooth animations and various presets.
To use the IranoProvider, Alert, and Toast components in your application, follow the example below:
IranoProviderFirst, ensure that your application is wrapped with the IranoProvider to provide context for the alert and toast functionalities.
import React from 'react';
import { IranoProvider } from 'react-native-irano';
import Home from './Home';
const App = () => {
return (
<IranoProvider
doneProps={{
titleStyle: { color: 'green' },
subtitleStyle: { color: 'lightgray' },
}}
loadingProps={{
titleStyle: { color: 'blue' },
subtitleStyle: { color: 'lightgray' },
}}
errorProps={{
titleStyle: { color: 'red' },
subtitleStyle: { color: 'lightgray' },
}}
>
<Home />
</IranoProvider>
);
};
export default App;
useIrano Hook in Your ComponentIn your component (e.g., Home), you can use the useIrano hook to access the showAlert and onToast functions.
import React from 'react';
import { View, Button } from 'react-native';
import { useIrano } from 'react-native-irano';
const Home = () => {
const { showAlert, onToast } = useIrano();
const handleShowAlert = () => {
showAlert({
title: 'Success!',
subtitle: 'Your operation was successful.',
preset: 'done',
});
};
const handleShowToast = () => {
onToast({
title: 'Toast Notification',
subtitle: 'This is a toast message.',
preset: 'success',
});
};
return (
<View>
<Button title="Show Alert" onPress={handleShowAlert} />
<Button title="Show Toast" onPress={handleShowToast} />
</View>
);
};
export default Home;
The Alert component is a customizable modal alert dialog for React Native applications. It provides visual feedback to users through various presets such as "done", "loading", and "error".
| Prop | Type | Description |
|---|---|---|
title | string | The title of the alert dialog. |
subtitle | string | The subtitle of the alert dialog. |
onClose | () => void | Callback function to be called when the alert is closed. |
visible | boolean | Controls the visibility of the alert dialog. |
preset | `'done' | 'loading' |
titleStyle | TextStyle | Custom styles for the title text. |
subtitleStyle | TextStyle | Custom styles for the subtitle text. |
animatedViewProps | AnimatedProps<ViewProps> | Additional props for the animated view. |
overlayStyle | ViewStyle | Custom styles for the modal overlay. |
autoHide | boolean | If true, the alert will automatically close after a specified delay. |
autoHideDelay | number | The delay in milliseconds before the alert automatically closes. |
delay | number | The delay in milliseconds before the animation starts. |
duration | number | The duration of the animation in milliseconds. |
The Toast component is a lightweight notification that appears temporarily at the top or bottom of the screen. It provides feedback to users about an operation.
| Prop | Type | Description |
|---|---|---|
title | string | The title of the toast notification. |
subtitle | string | The subtitle of the toast notification. |
onHide | () => void | Callback function to be called when the toast is hidden. |
preset | `'success' | 'error'` |
position | `'top' | 'bottom'` |
MAX_WIDTH | number | Maximum width of the toast. |
autoHideDuration | number | Duration in milliseconds before the toast automatically hides. |
iconContainerStyle | ViewStyle | Custom styles for the icon container. |
toastMainContainerStyle | ViewStyle | Custom styles for the main toast container. |
textContainerStyle | ViewStyle | Custom styles for the text container. |
titleStyle | TextStyle | Custom styles for the title text. |
subtitleStyle | TextStyle | Custom styles for the subtitle text. |
pathProps | PathProps | Additional props for the animated SVG path. |
react-native-reanimated.The components use default styles defined in their respective style objects. You can customize the appearance by passing your own styles through the relevant style props.
The Alert and Toast components utilize the react-native-reanimated library for smooth animations. The alert can animate in and out using various effects.
See the contributing guide to learn how to contribute to the repository and the development workflow.
This component is open-source and available under the MIT License. Feel free to use and modify it in your projects.
If you encounter any issues or have questions, please open an issue in the repository or contact the maintainers for support.
Made with create-react-native-library
FAQs
A customizable cross-platform toast notification library for React Native.
We found that react-native-irano demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.