You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@tarmiz/react-native-toast

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tarmiz/react-native-toast

Reusable custom toast components and hook for React Native

latest
Source
npmnpm
Version
1.4.0
Version published
Weekly downloads
384
Maintainers
1
Weekly downloads
 
Created
Source

react-native-toast

Reusable toast UI primitives for React Native.

Version 1.3.0

  • Refactored into components, hooks, and utils.
  • Built-in queue stack with max 3 toasts.
  • New custom toast type.
  • Default right color is #545D595E.

Install

yarn add @tarmiz/react-native-toast
yarn add react-native-reanimated react-native-safe-area-context react-native-responsive-screen lucide-react-native expo-blur expo-linear-gradient

Basic Usage

import React from "react";
import { Pressable, Text, View } from "react-native";
import { ALERT_TYPE, useBlurToast } from "@tarmiz/react-native-toast";

export const Example = () => {
  const { Toast, show } = useBlurToast();

  return (
    <>
      <View>
        <Pressable
          onPress={() =>
            show({
              textBody: "Saved successfully",
              type: ALERT_TYPE.SUCCESS,
              duration: 3000,
            })
          }
        >
          <Text>Show toast</Text>
        </Pressable>
      </View>

      <Toast />
    </>
  );
};

Custom Toast Usage

You can use the new custom option to control icon + left/right colors + text.

import React from "react";
import { Pressable, Text } from "react-native";
import { Rocket } from "lucide-react-native";
import { ALERT_TYPE, useBlurToast } from "@tarmiz/react-native-toast";

export const CustomToastExample = () => {
  const { Toast, show } = useBlurToast();

  return (
    <>
      <Pressable
        onPress={() =>
          show({
            textBody: "Deploy started",
            type: ALERT_TYPE.CUSTOM,
            icon: Rocket,
            iconColor: "#7EE787",
            leftColor: "rgba(126, 231, 135, 0.35)",
            rightColor: "rgba(84, 93, 89, 0.37)",
            duration: 3500,
          })
        }
      >
        <Text>Show custom toast</Text>
      </Pressable>

      <Toast />
    </>
  );
};

Toast Types

  • ALERT_TYPE.SUCCESS
  • ALERT_TYPE.INFO
  • ALERT_TYPE.DANGER
  • ALERT_TYPE.WARNING
  • ALERT_TYPE.CUSTOM

Legacy error input is still supported and mapped internally to danger.

Colors

You can pass any valid color for leftColor and rightColor, including named colors, hex, and rgba.

Default behavior:

  • Left color follows toast type color.
  • Right color defaults to #545D595E.

Add Video Demo

If you want a video in README, add this block and replace the URL with your own mp4:

If your package registry preview does not render video tags, add a fallback link below it:

Watch demo video

Keywords

react-native

FAQs

Package last updated on 14 Mar 2026

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