JSPM

react-toastly

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q46006F
  • License MIT

A beautiful React toast notification library with animations, gradients, sounds, and premium features for free.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-toastly) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    React Toastly

    A lightweight React toast notification library with sounds and promise support — written in JSX, no TypeScript required.

    Installation

    npm install react-toastly

    or

    yarn add react-toastly

    Usage

    Wrap your app with ToastlyProvider and call toast methods from useToastly hook.

    ToastlyProvider

    Provides context for toast management and renders toast UI.

    import { ToastlyProvider } from "react-toastly-jsx";
    
    function App() {
      return (
        <ToastlyProvider>
          <YourApp />
        </ToastlyProvider>
      );
    }

    useToastly Hook

    Use this hook inside your components to trigger toasts:

    import { useToastly } from "react-toastly-jsx";
    
    
    function MyComponent() {
      const toast = useToastly();
      return <button onClick={() => toast.success("Hello!")}>Show Toast</button>;
    }

    Toast Methods

    • success(msg)
    • error(msg)
    • warning(msg)
    • info(msg)
    • custom(content) - JSX content
    • promise(promise, {loading, success, error}) - Promise based toasts

    Sound Setup

    Place sound files in your public folder:

    • /public/sounds/success.mp3
    • /public/sounds/error.mp3
    • /public/sounds/warning.mp3
    • /public/sounds/info.mp3

    Example

    See Demo.jsx for a usage example.

    Features

    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

    Documentation Site

    For detailed usage, examples, and API references, visit our documentation website:

    https://react-toastly.dev

    License

    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: github.com/jeswin

    Email: webdevai.00@gmail.com

    Jeswin and the developer team are happy to assist with bugs, improvements, and any support related to this library.