Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@equinor/mad-toast

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/mad-toast

Toast package built on top of `react-native-toast-message`

latest
npmnpm
Version
0.3.0
Version published
Maintainers
2
Created
Source

Mad Toast

Mad Toast is a wrapper around react-native-toast-message that adds EDS styling to the toasts, and a queueing system for toasts.

Features

  • EDS styling
  • Toast queues
  • Simplified API

Installation

npm install @equinor/mad-toast

Usage

Add ToastEmitter component to your app. It should be the last child in your View hierarchy in order to prevent other components from rendering above it:

import { ToastEmitter } from "@equinor/mad-toast";

export function App(props) {
    return (
        <>
            {/* ... */}
            <ToastEmitter />
        </>
    );
}

Then use addToast anywhere in your app

// Foo.jsx
import { addToast } from "@equinor/mad-toast";
import { Button } from "react-native";

export function Foo(props) {
    const showToast = () => {
        addToast({
            type: "SUCCESS",
            text: "Hello",
        });
    };

    return <Button title="Show toast" onPress={showToast} />;
}

Docs

For more detailed information about how to use the package, head to our documentation page

Keywords

react native

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts