
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
react-native-alert-notification
Advanced tools
Toast notification and dialog box notification for react native
Theme Light | Theme Dark |
---|---|
Example One | Example Two | Example Three |
---|---|---|
###- Installing dependencies:
yarn add react-native-safe-area-context
pod install
###- Installing:
yarn add react-native-safe-area-context
import { ALERT_TYPE, Dialog, Root, Toast } from 'react-native-alert-notification';
<Root>
<View>
// dialog box
<Button
title={'dialog box'}
onPress={ () => Dialog.show({
type: ALERT_TYPE.SUCCESS,
title: 'Success',
textBody:'Congrats! this is dialog box success',
button:'close'
})}
/>
// toast notification
<Button
title={'toast notification'}
onPress={ () => Toast.show({
type: ALERT_TYPE.SUCCESS,
title: 'Success',
textBody:'Congrats! this is toast notification success',
})}
/>
</View>
</Root>
A React node that will be most likely wrapping your whole app.
Name | Description | Require | Default | Type |
---|---|---|---|---|
theme | select theme light dark (by default is auto) | auto | 'light','dark' | |
colors | Defines the type ("Success", "Warning" or "Error") | [IColors, IColors] | ||
dialogConfig | The text body | {closeOnOverlayTap:bool, autoClose:bool / number} | ||
toastConfig | name button (for hide button: undefined) | {autoClose:bool / number} |
type IProps = {
dialogConfig?: Pick<IConfigDialog, 'closeOnOverlayTap' | 'autoClose'>;
toastConfig?: Pick<IConfigToast, 'autoClose'>;
theme?: 'light' | 'dark';
colors?: [IColors, IColors] /** ['light_colors' , 'dark_colors'] */;
};
type IColors = {
label: string;
card: string;
overlay: string;
success: string;
danger: string;
warning: string;
};
Name | Description | Require | Default | Type |
---|---|---|---|---|
title | The title text | true | String | |
type | Defines the type ("Success", "Warning" or "Error") | true | "SUCCESS", "DANGER", "WARNING" | |
textBody | The text body | true | String | |
button | name button (for hide button: undefined) | String | ||
autoClose | Defines time auto close dialog box in ms | face | bool / number | |
closeOnOverlayTap | allow close if click in overlay | true | bool | |
onPressButton | (if not declared and isset button action is close) | String | () => void | |
onShow | action after end animation open | () => void | ||
onHide | action after end animation close | () => void |
type IConfig = {
type: ALERT_TYPE;
title: string;
textBody: string;
button?: string;
autoClose?: number | boolean;
closeOnOverlayTap?: boolean;
onPressButton?: () => void;
onShow?: () => void;
onHide?: () => void;
};
Name | Description | Require | Default | Type |
---|---|---|---|---|
title | The title text | true | String | |
type | Defines the type ("Success", "Warning" or "Error") | "SUCCESS", "DANGER", "WARNING" | ||
textBody | The text body | true | String | |
autoClose | Defines time auto close dialog box in ms | 5000 | bool / number | |
onPress | action click in card | bool | ||
onLongPress | action long click in card | () => void | ||
onShow | event after end animation open | () => void | ||
onHide | event after end animation close | () => void |
type IConfig = {
type?: ALERT_TYPE;
title: string;
textBody: string;
autoClose?: number | boolean;
onPress?: () => void;
onLongPress?: () => void;
onShow?: () => void;
onHide?: () => void;
};
Rodolphe Jerez | https://codingbyjerez.com
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
Toast notification and dialog box notification for react native
The npm package react-native-alert-notification receives a total of 1,900 weekly downloads. As such, react-native-alert-notification popularity was classified as popular.
We found that react-native-alert-notification 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.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.