Cross-platform Toast for React Native

A fast and cross-platform toast notification component that supports Android, iOS, Web, Windows.

More Features:

  • Normal, Success, Danger, and Warning toast types
  • Supports icons.
  • Smooth animations.

Install & Import:

# Yarn
$ yarn add react-native-fast-toast

# NPM
$ npm i react-native-fast-toast --saveimport React, { useEffect, useRef } from "react";
import Toast from "react-native-fast-toast";

Basic usage:

export default function App() {
  const toast = useRef(null);
  useEffect(() => {
    toast.current.show("Toast Notification");
  }, []);
  return (
    <>
      <RestOfYourApp />
      <Toast ref={toast} />
    </>
);

Available options:

toast.current.show("Toast Notification",{
  icon: <Icon />,
  type: "normal" | "success" | "danger" | "warning",
  duration: 5000,
  style: { padding: 0 },
  textStyle: { padding: 0 },
  successIcon?: <successIcon />,
  dangerIcon?: <dangerIcon />,
  warningIcon?: <warningIcon />,
});

Preview:

Fast Cross-platform Toast Component For React Native

Download Details:

Author: arnnis

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/arnnis/react-native-fast-toast

License: MIT

#react-native #react #reactjs 

Cross-platform Toast for React Native
1.00 GEEK