https://github.com/ripeworks/react-native-toasty
Tiny toast library for react-native and react-native-web
https://github.com/ripeworks/react-native-toasty
Last synced: 21 days ago
JSON representation
Tiny toast library for react-native and react-native-web
- Host: GitHub
- URL: https://github.com/ripeworks/react-native-toasty
- Owner: ripeworks
- License: mit
- Created: 2024-04-10T13:20:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-24T14:11:39.000Z (8 months ago)
- Last Synced: 2025-10-06T19:59:44.456Z (4 months ago)
- Language: TypeScript
- Size: 392 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-dan-forden

---
## Features
- Works on native platforms (iOS, Android), Expo, and Web
- Works with react-navigation and Modal (doesn't get hidden)
- Animations using Reanimated
- Override with your own simple Toast component
## Getting Started
### Installation
```sh
yarn add react-native-dan-forden
```
#### Dependencies
If you are using something like Expo, you should be all set.
If you are using a vanilla React Native setup, you will need some dependencies that you probably should have installed anyways: `react-native-gesture-handler react-native-reanimated react-native-safe-area-context react-native-screens`
> Note: dependencies only required for native platforms
### Usage
1. Add `ToastProvider` to your horizontal tree:
```tsx
// App.tsx
import { ToastProvider } from "react-native-dan-forden";
export default function App() {
return ...;
}
```
2. Use `showToast` when stuff happens:
```tsx
import { showToast } from "react-native-dan-forden";
export default function SignUp() {
async function onSubmit() {
try {
await login();
showToast({
type: "success",
message: "Welcome!",
});
} catch (err) {
showToast({
type: "danger",
message: "Your signup failed",
});
}
}
return (
Sign Up
);
}
```