Quickstart
This guide will get you from zero to showing toasts in just a few minutes.Make sure you’ve completed the installation steps before continuing.
Add the BreadLoaf component
TheBreadLoaf component manages and displays all toasts. Add it once to your app’s root component.
Show your first toast
Now you can show toasts from anywhere in your app using thetoast API:
Toast types
React Native Bread supports multiple toast types, each with its own icon and color scheme:Promise toasts
Promise toasts are perfect for tracking async operations. They automatically transition from loading → success or loading → error:Customize individual toasts
You can customize each toast by passing an options object:Available options
- duration - Display time in milliseconds (default: 4000)
- description - Secondary text below the title
- icon - Custom icon component or render function
- style - ViewStyle for the toast container
- titleStyle - TextStyle for the title
- descriptionStyle - TextStyle for the description
- dismissible - Enable/disable swipe to dismiss
- showCloseButton - Show/hide the close button
- deduplication - Enable/disable deduplication for this toast
- id - Stable ID for deduplication and updates
Custom toasts
For complete control over the toast appearance, usetoast.custom() with your own component:
- id - The toast ID
- dismiss - Function to dismiss this toast
- type - The toast type
- isExiting - Whether the toast is currently exiting
Global configuration
Customize default behavior for all toasts via theconfig prop on BreadLoaf:
Configuration options
position
position
Where toasts appear on screen:
'top' or 'bottom' (default: 'top')offset
offset
Extra spacing from screen edge in pixels, added to safe area insets (default: 0)
stacking
stacking
Show multiple toasts stacked (default:
true). When false, only one toast shows at a time.maxStack
maxStack
Maximum number of toasts visible at once when stacking is enabled (default: 3)
dismissible
dismissible
Allow toasts to be dismissed via swipe gesture (default:
true)showCloseButton
showCloseButton
defaultDuration
defaultDuration
Default display time in milliseconds (default: 4000)
deduplication
deduplication
Prevent duplicate toasts (default:
true). When enabled, showing the same toast plays a feedback animation instead of stacking.rtl
rtl
Enable right-to-left layout at the code level (default:
false). Only needed for JavaScript RTL - not required if using I18nManager.forceRTL().colors
colors
Custom colors per toast type. Each type has
accent (title/icon) and background colors.icons
icons
Custom icons per toast type. Provide a render function that receives
{ color, size }.toastStyle
toastStyle
Global ViewStyle overrides for all toast containers
titleStyle
titleStyle
Global TextStyle overrides for all toast titles
descriptionStyle
descriptionStyle
Global TextStyle overrides for all toast descriptions
Dismiss toasts programmatically
You can dismiss toasts manually using the returned ID or dismiss all toasts:Working with modals
Toasts automatically appear above modals on iOS. On Android, you have two options:Option 1: Use contained modal (simplest)
On Android,containedModal looks identical to modal but keeps the React hierarchy:
Option 2: Use ToastPortal
For native modals, addToastPortal inside your modal layouts:
app/(modal)/_layout.tsx
ToastPortal only renders on Android - it returns null on iOS, so no platform check is needed.Next steps
API reference
Explore the complete API documentation
Custom toasts
See real-world examples and advanced patterns
Customization
Learn how to customize colors, icons, and styles
Types
Type-safe toast usage with TypeScript