npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-pure-toastify

v1.0.1

Published

A highly customizable, 60FPS fluid swipe-to-dismiss toast notification system for React Native and Expo.

Downloads

260

Readme

react-native-pure-toastify 🚀

A highly customizable, 60FPS fluid swipe-to-dismiss toast notification system for React Native and Expo.

Inspired by react-toastify, it is built with zero external dependencies and is 100% compatible with Expo Go and React Native Bare workflows out-of-the-box.

🎬 Demo


Features ✨

  • Imperative Global API - Call toast.success(), toast.error(), etc., from anywhere (inside or outside of components).
  • 60FPS Native Animations - Uses native-driven spring and timing transitions.
  • Swipe-to-Dismiss Gestures - Built-in native horizontal swiping using PanResponder.
  • Shrinking Progress Timer - Visual progress bar displaying the time remaining before auto-close.
  • Haptic Vibration Integrations - Triggers clean physical vibration feedback on supported iOS & Android devices.
  • Light & Dark Theme Matching - Tailored high-fidelity palettes for Success, Warning, Error, Info, and Default states.
  • Zero Native Dependencies - Guaranteed Expo Go and Bare compatible.

Installation 📦

npm install react-native-pure-toastify

or

yarn add react-native-pure-toastify

Usage 🛠️

1. Setup the Root Provider

Wrap your application root with the ToastProvider:

import React from 'react';
import { ToastProvider } from 'react-native-pure-toastify';
import MainScreen from './src/MainScreen';

export default function App() {
  return (
    <ToastProvider position="top" duration={3000}>
      <MainScreen />
    </ToastProvider>
  );
}

2. Trigger Toasts from Anywhere

Use the global toast object to dispatch success, error, warning, or informational alerts:

import React from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { toast } from 'react-native-pure-toastify';

export default function MainScreen() {
  const triggerSuccess = () => {
    toast.success("Payment Received!", {
      description: "A copy of your receipt has been sent to your inbox.",
      haptic: "success",
    });
  };

  const triggerError = () => {
    toast.error("Declined", {
      description: "Please check your credentials and try again.",
      haptic: "error",
    });
  };

  return (
    <View style={styles.container}>
      <TouchableOpacity style={styles.button} onPress={triggerSuccess}>
        <Text style={styles.text}>Trigger Success</Text>
      </TouchableOpacity>

      <TouchableOpacity style={[styles.button, styles.errorBtn]} onPress={triggerError}>
        <Text style={styles.text}>Trigger Error</Text>
      </TouchableOpacity>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    gap: 16,
  },
  button: {
    backgroundColor: '#10B981',
    paddingVertical: 12,
    paddingHorizontal: 24,
    borderRadius: 8,
  },
  errorBtn: {
    backgroundColor: '#EF4444',
  },
  text: {
    color: '#FFFFFF',
    fontWeight: 'bold',
  },
});

API Reference 📖

ToastProvider Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | position | 'top' \| 'bottom' | 'top' | Anchors notifications to the top or bottom of the screen. | | duration | number | 3000 | Default time (in milliseconds) before the toast auto-closes. |

Toast Options

All toast methods take an optional ToastOptions configuration object:

toast.success("Message", options);

| Property | Type | Description | |----------|------|-------------| | description | string | Secondary descriptive text below the main message. | | duration | number | Overrides the default duration for this specific alert. | | autoClose | boolean | If set to false, the alert remains open until clicked or swiped. | | haptic | 'success' \| 'warning' \| 'error' \| 'selection' | Triggers a safe physical vibration pattern. | | onPress | () => void | Callback triggered when the toast card is tapped. | | onClose | () => void | Callback triggered when the toast card is dismissed/auto-closed. |


License 📄

MIT