๐ŸŽ‰ toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

Overview

toastify-react-native

npm version

๐ŸŽ‰ toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

Demo

View examples on snack.expo.io

20210515_231132

Features

  • Smooth enter/exit animations
  • Plain simple and flexible APIs
  • Resize itself correctly on device rotation
  • Swipeable
  • Easy to set up for real, you can make it work in less than 10sec!
  • Super easy to customize
  • RTL support
  • Swipe to close ๐Ÿ‘Œ
  • Can choose swipe direction
  • Super easy to use an animation of your choice. Works well with animate.css for example
  • Define behavior per toast
  • Pause toast by click on the toast ๐Ÿ‘
  • Fancy progress bar to display the remaining time
  • Possibility to update a toast
  • You can control the progress bar a la nprogress ๐Ÿ˜ฒ
  • You can display multiple toast at the same time
  • Dark mode ๐ŸŒ’
  • And much more !

Installation

$ npm install toastify-react-native

A complete example

App.js

import React from 'react';
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';

import Another from './app/components/Another';
import ToastManager, { Toast } from 'toastify-react-native';

export default function App() {

  return (
    <View style={styles.container} >
      {/* Toast Manager */}
      <ToastManager />

      {/* another component */}
      <Another />

      {/* Button */}
      <TouchableOpacity onPress={() => Toast.success("This is success message")} style={styles.buttonStyle} >
        <Text>
          SHOW SOME AWESOMENESS !
        </Text>
      </TouchableOpacity>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
  buttonStyle: {
    marginTop: 10,
    backgroundColor: "white",
    borderColor: "green",
    borderWidth: 2,
    padding: 10
  }
});

another.js

import React from 'react';
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
import { Toast } from 'toastify-react-nativer';
export default function Another() {

    return (
        <View style={styles.container} >
            <TouchableOpacity onPress={() => Toast.dark("This is dark Message")} 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
    }
});

For a more complex example take a look at the /example directory.

Available props

Name Type Default Description
width number 256 Width of toast
height number 68 Height of the toast
style any null Style applied to the toast
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 rightInLeftOut, rightInOut or fancy rightInLeftOut 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.5 The backdrop opacity when the toast is visible

|

Available animations

Take a look at react-native-animatable to see the dozens of animations available out-of-the-box.

Acknowledgements

Pull requests, feedbacks and suggestions are welcome!

License

toastify-react-native is MIT licensed and built with โค๏ธ by Zahid Ali.

You might also like...

The Bookstore is a website similar to the "Awesome Books" website built in the previous module. You will create an MVP version of it that allows you to: Display a list of books. Add a book. Remove a selected book.

The Bookstore is a website similar to the

Bookstore The Bookstore is a website similar to the "Awesome Books" website built in the previous module. You will create an MVP version of it that al

Jun 12, 2022

Check EU Digitial Covid Certificates with ease and validate them against country and local rules.

Check EU Digitial Covid Certificates with ease and validate them against country and local rules.

Check EU Digitial Covid Certificates with ease and validate them against local or country rules. What is the purpose of CovidValidator? CovidValidator

Mar 14, 2022

frida runtime (no python required, only a single file),One-click support for ios smashing shell

fd ็ฎ€่ฆไป‹็ป ่ฆๆ˜ฏไฝ ็œ‹ไธๆ‡‚ไธญๆ–‡ๅฏไปฅไฝฟ็”จchrome็ฟป่ฏ‘ๅŠŸ่ƒฝ frida ่ฟ่กŒๆ—ถ(ไธ้œ€่ฆpython,ๅชๆœ‰ๅ•ไธ€ไธชๆ–‡ไปถ) fd ไฝฟ็”จfdๅ‰่ฏท็กฎ่ฎคๆ‰‹ๆœบไธŠๆœ‰frida-server a brief introdction English can use chrome translation frida r

Dec 30, 2022

Based on pure JS scripts, without relying on native, no need for react-native link, Title / Header / Tabs / Sticky / Screen components can be flexibly configured, among which Tabs / Sticky can slide When it reaches the top, it will be topped.

Based on pure JS scripts, without relying on native, no need for react-native link, Title / Header / Tabs / Sticky / Screen components can be flexibly configured, among which Tabs / Sticky can slide When it reaches the top, it will be topped.

react-native-scrollable-tabview English | ็ฎ€ไฝ“ไธญๆ–‡ Based on pure JS scripts, without relying on native, no need for react-native link,Title / Header / Tab

Dec 30, 2022

Interactive web app where you can Store ,Add and Remove books to organize the books that you've read or the ones willing to read

bookStore Interactive web app where you can Store ,Add and Remove books to organize the books that you've read or the ones willing to read Built With

Jul 20, 2022

Web Application that allows you to add and remove books

Web Application that allows you to add and remove books! This project was created with the purpose of consolidating the creator's knowledge of React.

Feb 26, 2022

Book Store is a website that allows you to add, remove and view books.

Book Store Book Store is a website that allows you to add, remove and view books. Built With ReactJS Redux React Router Getting Started with Create Re

Jun 23, 2022

The Bookstore is a website similar to the "Awesome Books" website. Here we will create an MVP version of it that allows you to: Display a list of books, Add a book and Remove a selected book.

The Bookstore is a website similar to the

Book Store This is Book Store project. Built With HTML CSS JavaScript React Screenshot Live Demo Go Live ๐Ÿ˜Ž Getting Started Open dev branch Open VSCod

May 3, 2022

A weather app done with React. Allows you to make a search for the current weather by simply typing "common knowledge" cities and save them to favourites on local storage.

A weather app done with React. Allows you to make a search for the current weather by simply typing

Simpliest Weather React-App A weather app done with React. Allows you to make a search for the current weather by simply typing "common knowledge" cit

Aug 24, 2022
Comments
Releases(c.3.1.1)
  • c.3.1.1(Sep 16, 2022)

  • v2.0.0(May 21, 2021)

    • Global access to an instance of ToastManager class.
    • We Configure ToastManager class only once in the root component and can use toast notifications anywhere in the application.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(May 15, 2021)

Owner
Zahid Ali
๐Ÿ‘จโ€๐Ÿ’ป Full Stack JavaScript Developer // ๐Ÿ‘จโ€๐Ÿ’ป C# Developer // ๐ŸŽ‡ Graphic Designer // Open Source Lover๐Ÿ˜
Zahid Ali
You can use this CLI Tool to clean your iOS and Android projects and keep them updated.

Mobile App Cleaner You can use this CLI Tool to clean your iOS and Android projects and keep them updated. This tool automatizes these items below; Cl

automizer 21 Mar 19, 2022
WPPConnect/mobile is an open source project with the objective of automating whatsapp web using the android or ios mobile browser and being able to perform all the functions of our wa-js project

WPPConnect/mobile is an open source project with the objective of automating whatsapp web using the android or ios mobile browser and being able to perform all the functions of our wa-js project, so it is possible to create a customer service, media sending, intelligence recognition based on artificial phrases and many other things, use your imagination to change and modify this project or collaborate on improvements...

null 11 Dec 28, 2022
Free React Native library to display local notifications.

React-Native NotiFREE โš› React Native library to display local notifications. A FREE alternative to React Native NotiFEE. Why? Nobody can remove the gr

Douglas Nassif Roma Junior 23 Nov 10, 2022
An eCommerce website that allows you to sign in and create an account and buy products and pay using PayPal and includes a dashboard that allows you to (add, update, and remove) a product...

An eCommerce website that allows you to sign in and create an account and buy products and pay using PayPal and includes a dashboard that allows you to (add, update, and remove) a product...

Mohamed Aachour 7 Oct 1, 2022
๐Ÿ’š Yet another mutli purpose discord bot, allowing you to maintain and manage your discord server with ease.

Jade Jade is once again another mutli purpose bot, allowing you to maintain and manage your discord server with ease. Completely open source or use th

Saige 1 Sep 13, 2022
๐ŸŒ€ Insert Awesome Shapes into Your React Site with Ease

React Awesome Shapes ?? Insert Awesome Shapes into Your React Site with Ease. Loved the project? Please consider donating to help it improve! Consider

Ashutosh Hathidara 608 Dec 30, 2022
A bookstore app that allows a user add a book, displays added book with reviews and rating for each book and allows a user delete a book.

BOOKSTORE A bookstore app that allows a user add a book, displays added book with reviews and rating for each book and allows a user delete a book. Bu

Promise Okechukwu 7 Nov 1, 2022
Expo Config Plugin that generates an App Clip for iOS apps built with Expo.

react-native-app-clip Expo Config Plugin that generates an App Clip for iOS apps built with Expo. Warning This plugin is a work in progress and hasnโ€™t

Benedikt 186 Dec 24, 2022
"BookStore" is a web app for adding books. It is a Single Page App (SPA) that allows users to add and remove a book from the library

BookStore | M3Wx "BookStore" is a web app for adding and removing books from a library storage. It is a Single Page App (SPA) that allows users to add

Alexander Oguzie-Ibeh 4 Apr 11, 2022