New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-action-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

react-native-action-toast

A premium, customizable toast notification system for React Native with action buttons, beautiful animations, and Expo compatibility

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

React Native Action Toast 🚀

Demo Video npm version

An elegant toast notification library for React Native featuring interactive action buttons, smooth animations, and seamless Expo integration

✨ Features

  • 🎨 Stunning gradient backgrounds
  • 🛠 Customizable action buttons
  • 📱 Expo compatible (no native linking required)
  • ⚡ Position options: top or bottom
  • 🔔 Built-in notification types: success, error, etc.

🎥 Watch it in Action

Watch the demo

(Click the badge above to watch the demo video)

📦 Installation

npm install react-native-action-toast

or

yarn add react-native-action-toast

or

npx expo install react-native-action-toast

🪶Quick Start

  • Add ToastManger in App
import { ToastManager, initializeToast } from 'react-native-action-toast';

export default function App() {
  const toastRef = initializeToast(); // intialze ref

  return (
    <>
      {/* Your app content */}
      <ToastManager ref={toastRef} /> // Add ToastManger and pass the toastRef
    </>
  );
}
  • Start using toasts anywhere in the app.
import { getToastManager } from 'react-native-action-toast';


// Toast with action buttons
getToastManager().showToast({
  title: "New Message",
  message: "You have 3 unread conversations",
  position: "top",
  actionButtons: [
    {
      text: "View",
      onPress: () => console.log("View pressed"),
      backgroundColor: "#4CAF50"
    }
  ]
});

// Quick methods
//Success
getToastManager().showSuccess(
    "Changes will take around 1-2 hours to reflect across all devices.", //messgae
    "Profile Saved", //title
    "bottom" //position
    )
// Error
getToastManager().showError(
    "Failed to save changes",
    undefined, //each quick methods have default titles.
    "top"
    )
//Similar showInfo and showWarning methods

//Quick custom toast
getToastManager().showCustom(
    "Custom settings have been applied", //message
    "Custom Style", //title
    "bottom", //postiton
    "palette", //icon name
    undefined, //backgroundColor
    ["#9c27b0", "#673ab7"] //gradinet colors
    )

📚 API Reference

🔔 Toast Options

PropTypeDefaultDescription
titlestring-Toast title
messagestring-Toast message
position'top' or 'bottom''bottom'Toast position
durationnumber4000Display duration in ms
iconstring or ReactNode-Icon name or custom component
gradientColorsstring[]-Gradient background colors
backgroundColorstring-Solid background color (alternative)
actionButtonsActionButton[]-Array of action buttons

🧩 ActionButton

PropTypeDescription
textstringButton label
onPressfunctionClick handler
backgroundColorstringButton background
textStyleTextStyleOptional text styles
iconReactNodeOptional custom icon
iconPosition'left' or 'right'Icon position

🎨 Examples

// Custom toast with two buttons
getToastManager().showToast({
  title: "New Feature Available",
  message: "Try our new dark mode!",
  position: "top",
  icon: "star",
  gradientColors: ["#6a11cb", "#2575fc"],
  actionButtons: [
    {
      text: "Enable",
      onPress: enableDarkMode,
      backgroundColor: "#2575fc"
    },
    {
      text: "Later",
      onPress: () => {},
      backgroundColor: "rgba(255,255,255,0.2)"
    }
  ]
});

Keywords

react-native

FAQs

Package last updated on 26 Sep 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