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 likereact-native-toast-messageinstead.
ios-stack-demo.mov
Check out the stacked presentation guide for more info.
π₯ Native animations with ultra-smooth transitions on both platforms.
- Display modes:
alertorstacked - 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)
- Position:
- Haptic Feedback Support
- Safe-area aware
- Gesture Dismissal (swipe to dismiss)
- Auto Dismiss Pause when holding
See the INSTALLATION.md guide for full setup, requirements, and platform instructions.
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,
});
// 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);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' },
}
);
}- Custom Icons: Learn how to use
react-native-vector-iconsor local images. - Stacked Toasts: See how to manage multiple queued toasts.
| 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 |
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 |
Contributions are always welcome! If you have an idea, find a bug, or want to help improve the library, please feel free to:
- Create an issue to report bugs or suggest features.
- Open a pull request with your improvements.
Made with β€οΈ by Kiet Huynh
See CHANGELOG.md for release notes and version history.

