Notifications A Customize And Easliy Use Alert Component For React.js Nov 24, 2021 1 min read react-custom-alert Easy to set up and call alert function like calling a hook. light weight. (gzipped : 1.3KB) customize alert component. Installation $ npm install --save react-custom-alert $ yarn add react-custom-alert Sh Example import React from 'react'; import { AlertContainer, alert } from 'react-custom-alert'; import 'react-custom-alert/index.css'; // import css file from root. function RootComponent() { return ( <> <App /> {/* Add ToastContainer from your root component. */} {/* If no floatingTime, the default is 3000ms. */} <ToastContainer floatingTime={5000} /> </> ); } function App() { // alert type : info | success | warning | error const alertInfo = () => alert({ message: 'info', type: 'info' }); const alertSuccess = () => alert({ message: 'success', type: 'success' }); const alertWarning = () => alert({ message: 'warning', type: 'warning' }); const alertError = () => alert({ message: 'error', type: 'error' }); return ( <div> <button onClick={alertInfo}>Info</button> <button onClick={alertSuccess}>Success</button> <button onClick={alertWarning}>Warning</button> <button onClick={alertError}>Error</button> </div> ); } Js GitHub https://github.com/gusrb3164/react-custom-alert NotificationsAlerts
Alerts Alerts component for react Shows an alert in the position and for the duration specified. You will most likely want to pass your own custom alert component to use with the library, see below. 05 October 2019
Modals Tiny React hook that helps you to manage your modals or whatever overlay UI state Tiny React hook that helps you to manage your modals or whatever overlay UI state 19 September 2023
Toasts An incredibly simple toast notification system for React An incredibly simple toast notification system for React 15 August 2023