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-bread

v0.4.0

Published

A lightweight toast library for React Native with premium feeling animations and complex gesture support

Downloads

902

Readme

React Native Bread 🍞

An extremely lightweight, opinionated toast component for React Native.

demo

Features

  • Extremely lightweight package, only 14KB packed size
  • Clean, imperative API inspired by Sonner
  • Zero setup - add one component, start toasting. No hooks, no providers
  • Built for mobile with smooth 60fps animations powered by Reanimated
  • Natural swipe gestures that feel native to the platform
  • Multiple toast types: success, error, info, and promise
  • Promise handling with automatic loading → success/error states
  • Complex animations and gestures but with high performance
  • Toast stacking with configurable limits
  • Position toasts at top or bottom of screen
  • RTL built-in support - perfect for Arabic and other RTL languages
  • Completely customizable - colors, icons, styles, animations
  • Full Expo compatibility
  • Imperative API works anywhere - components, utilities, event handlers

Installation

bun add react-native-bread

Peer Dependencies

This package requires the following peer dependencies:

| Package | Version | |---------|---------| | react-native-reanimated | >= 4.2.0 | | react-native-gesture-handler | >= 2.25.0 | | react-native-safe-area-context | >= 5.0.0 | | react-native-svg | >= 15.8.0 | | react-native-worklets | >= 0.7.0 |

If you don't have these installed, you can install all peer dependencies at once:

bun add react-native-reanimated react-native-gesture-handler react-native-safe-area-context react-native-svg react-native-worklets

Or with npm:

npm install react-native-reanimated react-native-gesture-handler react-native-safe-area-context react-native-svg react-native-worklets

Note: react-native-reanimated 4.2.x requires react-native-worklets 0.7.x. Using older versions of worklets with reanimated 4.2+ will cause compatibility issues.

Usage

In your App.tsx/entry point

import { BreadLoaf } from 'react-native-bread';

function App() {
  return (
    <View>
      <NavigationContainer>...</NavigationContainer>
      <BreadLoaf />
    </View>
  );
}

Expo Router

When using Expo Router, place the BreadLoaf component in your root layout file (app/_layout.tsx):

import { BreadLoaf } from 'react-native-bread';
import { Stack } from 'expo-router';

export default function RootLayout() {
  return (
    <>
      <Stack>
        <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
        <Stack.Screen name="+not-found" />
      </Stack>
      <BreadLoaf />
    </>
  );
}

This ensures the toasts will be displayed across all screens in your app.

Show a toast

import { toast } from 'react-native-bread';

// Basic usage
toast.success('Saved!');

// With description
toast.success('Saved!', 'Your changes have been saved');
toast.error('Error', 'Something went wrong');
toast.info('Tip', 'Swipe to dismiss');

// Promise toast - shows loading, then success/error
toast.promise(fetchData(), {
  loading: { title: 'Loading...', description: 'Please wait' },
  success: { title: 'Done!', description: 'Data loaded' },
  error: (err) => ({ title: 'Failed', description: err.message }),
});

Customization

Per-Toast Options

Pass an options object as the second argument to customize individual toasts:

toast.success('Saved!', {
  description: 'Your changes have been saved',
  duration: 5000,
  icon: <CustomIcon />,
  style: { backgroundColor: '#fff' },
  dismissible: true,
  showCloseButton: true,
});

Global Configuration

Customize all toasts globally via the config prop on <BreadLoaf />:

<BreadLoaf
  config={{
    position: 'bottom',
    rtl: false, // Enable for RTL languages
    stacking: true,
    maxStack: 3,
    defaultDuration: 4000,
    colors: {
      success: { accent: '#22c55e', background: '#f0fdf4' },
      error: { accent: '#ef4444', background: '#fef2f2' },
    }
  }}
/>

Available options include:

  • position: 'top' | 'bottom' - Where toasts appear
  • offset: Extra spacing from screen edge
  • stacking: Show multiple toasts stacked
  • maxStack: Max visible toasts when stacking
  • dismissible: Allow swipe to dismiss
  • showCloseButton: Show X button
  • defaultDuration: Default display time in ms
  • colors: Custom colors per toast type
  • icons: Custom icons per toast type
  • toastStyle, titleStyle, descriptionStyle: Global style overrides

API Reference

| Method | Description | |--------|-------------| | toast.success(title, description?) | Show success toast | | toast.error(title, description?) | Show error toast | | toast.info(title, description?) | Show info toast | | toast.promise(promise, messages) | Show loading → success/error toast | | toast.dismiss(id) | Dismiss a specific toast | | toast.dismissAll() | Dismiss all toasts |

Known Issues

Modal Pages: Toasts may render behind React Native's screenOptions={{ presentation: "modal" }} since they are mounted at the native layer above the whole app.

Solution: Use screenOptions={{ presentation: "containedModal" }}, or add another <BreadLoaf> inside the modal page.