A fast and cross-platform toast notification component that supports Android, iOS, Web, Windows.
# 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";
export default function App() {
const toast = useRef(null);
useEffect(() => {
toast.current.show("Toast Notification");
}, []);
return (
<>
<RestOfYourApp />
<Toast ref={toast} />
</>
);
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 />,
});
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