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

@selimh/react-native-toast

v0.4.0

Published

A beautifully animated, highly customizable, imperative Toast library for React Native.

Readme

@selimh/react-native-toast

A beautifully animated, highly customizable, and imperative Toast library for React Native based on react-native-reanimated.

Image

Installation

npm install @selimh/react-native-toast
# or
yarn add @selimh/react-native-toast

You also need to install the peer dependencies:

yarn add react-native-reanimated react-native-safe-area-context

Note: Make sure to follow the installation instructions for react-native-reanimated (e.g., adding the babel plugin) and react-native-safe-area-context.

Usage

  1. Wrap your root directory with ToastProvider:
import { ToastProvider } from '@selimh/react-native-toast';
import { SafeAreaProvider } from 'react-native-safe-area-context';

export default function App() {
  return (
    <SafeAreaProvider>
      {/* 
        theme can be 'light', 'dark', or 'system' (default: 'system')
        It will automatically detect user's device preferences.
      */}
      <ToastProvider theme="system">
        {/* Your app components */}
      </ToastProvider>
    </SafeAreaProvider>
  );
}
  1. Call Toast.show from anywhere in your app:
import { Toast } from '@selimh/react-native-toast';

Toast.show({
  type: 'success',
  text1: 'Hello',
  text2: 'This is an awesome toast',
  position: 'top',
  visibilityTime: 4000,
});

Swipe to Dismiss

A pure, dependency-free Swipe to Dismiss logic is built directly into the core using React Native's Native PanResponder and seamlessly hooks into Reanimated.

  • You can drag top toasts upwards and bottom toasts downwards to dismiss them early.
  • It is enabled by default. To disable it, simply pass swipeable: false.

Dark Mode (Theme) Support

@selimh/react-native-toast perfectly supports light and dark modes out of the box.

  1. System Dependant (Default): If you pass theme="system" to ToastProvider or omit it, the toast will automatically adapt to the user's iOS/Android theme.
  2. Forced Theme: You can override the theme dynamically on a per-toast basis:
Toast.show({
  type: 'info',
  theme: 'dark', // 'light' | 'dark' | 'system'
  text1: 'Always Dark',
});

APIs

Toast.show(options: ToastOptions)

| Option | Type | Default | Description | | --- | --- | --- | --- | | type | 'success' \| 'error' \| 'info' \| 'warning' | 'info' | Type of the toast | | text1 | string | undefined | Primary text | | text2 | string | undefined | Secondary description | | position | 'top' \| 'bottom' | 'top' | Position of the toast | | theme | 'light' \| 'dark' \| 'system' | 'system' | Toast visual theme | | animationType | 'spring' \| 'slide' \| 'fade' | 'fade' | Animation style for enter/exit | | visibilityTime | number | 3000 | Duration in ms | | topOffset | number | 40 | Offset from top edge | | bottomOffset | number | 40 | Offset from bottom edge | | autoHide | boolean | true | If false, toast will not hide automatically | | swipeable | boolean | true | Enables Swipe to Dismiss natively using PanResponder | | customView | React.ReactNode | undefined | Render a completely custom component | | onPress | () => void | undefined | Called when toast is tapped | | onShow | () => void | undefined | Called when animation finishes showing | | onHide | () => void | undefined | Called when animation finishes hiding |

Toast.hide()

Hides the currently visible toast.

License

MIT