Customizable Global Alert Component For React Native

A fully customizable global alert component for React Native.

Features:

  • Support passing a custom component.
  • Less State and simple to use.
  • Can be used from any screen.
  • Customizable on various levels.
  • Change Font Family.
  • By default opening and closing animations.

How to use it:

1. Import the easy alert component.

# Yarn
$ yarn add react-native-easy-alert

# NPM
$ npm i react-native-easy-alert
import AlertBox from 'react-native-easy-alert';

2. Create a basic alert box.

const App = () => {
  return (
    <>
      <RootComponent />
      <AlertBox
        headerStyles={{backgroundColor: '#000',}}
        headerTextStyles={{color: '#fff'}}
        bodyTextStyles={{color: '#333'}}
      />
    <>
  );
};

3. Available component props.

overlayColor?: string;
mainContainerStyles?: ViewStyle;
headerStyles?: ViewStyle;
containerStyles?: ViewStyle;
footerStyles?: ViewStyle;
bodyStyles?: ViewStyle;
overLayStyles?: ViewStyle;
buttonStyles?: ViewStyle;
headerTextStyles?: TextStyle;
bodyTextStyles?: TextStyle;
globalTextStyles?: TextStyle;
buttonTextstyles?: TextStyle;
customChildren?: any;
isRemoveChildrenAnimation?: boolean;
hideHeader?: boolean;
hideCloseIcon?: boolean;
closeIcon?: null | any;
containerRadius?: number;
buttonBorderRight?: number;
crossIconColor?: string;

Preview:

Customizable Global Alert Component For React Native

Download Details:

Author: mohamadmek

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/mohamadmek/react-native-easy-alert

License: MIT

You Might Be Interested In:

Tags:

Add Comment