0.0.12 • Published 8 months ago

expo-toastee v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Toast Notification System for Expo React Native Project

This is a custom toast notification system for Expo React Native projects. The system uses a singleton ToastManager to manage toast notifications globally, and a ToastContainer component to display the toast messages.

Features

  • Global Toast Management: The ToastManager allows toast notifications to be triggered from anywhere in the app.
  • Customizable Toasts: You can specify the message, type (success, error, info), and duration of the toast.
  • Automatic or Manual Dismissal: Toasts automatically disappear after a specified duration, or they can be manually dismissed by tapping on them.
  • React Native Reanimated: Uses react-native-reanimated to animate toast appearances and disappearances.

Installation

  1. Clone the repository:
npm i expo-toastee
  1. Import the ToastManager and ToastContainer components into your project:
import { ToastContainer } from 'expo-toastee'

// Inside your main component
return (
  <View style={styles.container}>
    <Text>My App</Text>
    <ToastContainer />
  </View>
)
  1. Trigger a toast message from anywhere in your app:
import { toast } from 'expo-toastee'

// Show a toast message
toast.show({
  message: 'Operation successful!',
  type: 'success', // 'success', 'error', 'info'
  duration: 3000, // Duration in milliseconds (default is 2000ms)
})

Usage

The toast notification system consists of two components: ToastManager and ToastContainer.

Toast Notification System for Expo React Native Project

This is a custom toast notification system for Expo React Native projects. The system uses a singleton ToastManager to manage toast notifications globally, and a ToastContainer component to display the toast messages.

0.0.12

8 months ago

0.0.11

8 months ago

0.0.10

8 months ago

0.0.9

8 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago