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-nitro-toast

v1.2.7

Published

A lightweight toast message library for React Native built with Nitro modules.

Readme

npm license downloads

🚀 react-native-nitro-toast

Why Nitro Toast?

react-native-nitro-toast is a lightweight, native-powered toast notification library for React Native, built with SwiftUI (iOS) and Jetpack Compose (Android). It is designed for:

  • 100% Native UI — zero bridge, TurboModule-native
  • 🚀 Smooth Animations — powered by SwiftUI & Compose
  • 🎯 Simple API — with sensible defaults and full TypeScript support
  • 🎨 Highly Customizable — override colors, icons, positions, haptics

⚠️ Looking for full layout customization (e.g. JSX content)?
Consider using a JavaScript-based solution like react-native-toast-message instead.

📸 Preview

🔔 Alert Style (Default)

iOS Toast Demo

Android Toast Demo

🍞 Stacked Presentation

https://github.com/user-attachments/assets/a4ba0016-3b17-4b50-9b58-09357eb10047

Check out the stacked presentation guide for more info.

🔥 Native animations with ultra-smooth transitions on both platforms.

✨ Features

  • Display modes: alert or stacked
  • Predefined Types: success, error, info, warning, default, loading
  • Promise-based toasts (loading → success/error)
  • Highly Customizable:
    • Position: top / bottom
    • Duration-based or sticky
    • Color overrides (titleColor, messageColor, backgroundColor)
    • Custom icon support (via iconUri)
    • Custom font support (via fontFamily)
  • Haptic Feedback Support
  • Safe-area aware
  • Gesture Dismissal (swipe to dismiss)
  • Auto Dismiss Pause when holding

📦 Installation

See the INSTALLATION.md guide for full setup, requirements, and platform instructions.

🔧 Quick Start

Check out the example app for a full working demo.

import { showToast, dismissToast } from 'react-native-nitro-toast';

// Basic usage
showToast('Upload completed!');

// Advanced usage
showToast('Upload completed!', {
  type: 'success',
  position: 'top',
  duration: 3000,
  title: 'Success',
  backgroundColor: '#4CAF50',
  messageColor: '#FFFFFF',
  haptics: true,
});

// Hide title completely
showToast('Just a message, no title', {
  title: '',
  backgroundColor: '#333',
});

// Manual loading toast (useful for loading or sticky toasts)
const id = showToast('Loading...', { type: 'loading' });
// Dismiss the toast when your async work is done
dismissToast(id);

⏳ Promise-based Toasts

import { showToastPromise } from 'react-native-nitro-toast';

// Example: Show a toast for an async upload process
function handleUpload() {
  showToastPromise(
    uploadFile(), // Replace with your async function returning a promise
    {
      loading: 'Uploading your file...',
      success: result => result.message,
      error: error => error instanceof Error ? error.message : 'Upload failed. Please try again.',
    },
    {
      position: 'top',
      haptics: true,
      loading: { title: 'Uploading' },
    }
  );
}

📚 Guides & Documentation

  • Custom Icons: Learn how to use react-native-vector-icons or local images.
  • Stacked Toasts: See how to manage multiple queued toasts.

🛠 Configuration Options

| Prop | Type | Default | Description | |------------------|------------------------------|-------------|--------------------------------------------| | type | success, error, info, warning, default, loading | 'default' | Predefined visual styles, including loading indicator | | message | string | (required) | Toast message | | title | string | null | Optional title. Pass empty string "" to hide title completely | | fontFamily | string | null | Custom font family (e.g. Rubik, Delius...) | | duration | number (MS) | 4000 | Auto-dismiss duration (0 for sticky/manual) | | position | 'top' | 'bottom' | 'bottom' | Toast position | | presentation | 'stacked' | 'alert' | 'alert' | alert: single toast. stacked: queue multiple toasts. | | haptics | boolean | false | Enable haptic feedback (requires VIBRATE permission on Android) | | iconUri | string (URI) | undefined | Custom icon image URI. | | backgroundColor| string (HEX) | Varies by type | Custom background | | titleColor | string (HEX) | Varies by type | Custom title color (optional) | | messageColor | string (HEX) | Varies by type | Custom message color (optional) | | useOverlay | boolean | true | Apply semi-transparent overlay |

🤝 Contributing & Issues

Contributions are always welcome! If you have an idea, find a bug, or want to help improve the library, please feel free to:

👨‍💻 Author

Made with ❤️ by Kiet Huynh

📝 Changelog

See CHANGELOG.md for release notes and version history.

📝 License

MIT