A lightweight React toast notification library with sounds and promise support — written in JSX, no TypeScript required.
npm install react-toastly
or
yarn add react-toastly
Wrap your app with ToastlyProvider
and call toast methods from useToastly
hook.
Provides context for toast management and renders toast UI.
import { ToastlyProvider } from "react-toastly";
function App() {
return (
<ToastlyProvider>
<YourApp />
</ToastlyProvider>
);
}
Use this hook inside your components to trigger toasts:
import { useToastly } from "react-toastly";
function MyComponent() {
const toast = useToastly();
return <button onClick={() => toast.success("Hello!")}>Show Toast</button>;
}
success(msg)
error(msg)
warning(msg)
info(msg)
-
custom(content)
- JSX content -
promise(promise, {loading, success, error})
- Promise based toasts
Place sound files in your public folder:
- /public/sounds/success.mp3
- /public/sounds/error.mp3
- /public/sounds/warning.mp3
- /public/sounds/info.mp3
See Demo.jsx
for a usage example.
Feature | Description |
---|---|
Toast Types | success, error, warning, info, custom |
Promise-based Toasts | Display loading, success, and error states automatically |
Sound Notifications | Plays sound for each toast type |
Easy Setup | Simple provider and hook API |
Customizable | Pass JSX content for custom toasts |
Animations | Slide-in effect on toast appearance |
Auto Dismiss | Toasts auto disappear after duration |
For detailed usage, examples, and API references, visit our documentation website:
Live Demo & Documentation: https://react-infinite-toast.vercel.app
GitHub Repository: https://github.com/Web-dev-Ai-00/react-toastly
MIT License © 2025 Jeswin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Developer Support For any issues, feature requests, or questions about React Toastly, please feel free to reach out to the developer team:
developer Team
GitHub: https://github.com/Web-dev-Ai-00/react-toastly.git
Email: webdevai.00@gmail.com
Jeswin and the developer team are happy to assist with bugs, improvements, and any support related to this library.