https://github.com/luoxuhai/react-native-overlay
The Native Toasts for React Native iOS
https://github.com/luoxuhai/react-native-overlay
ios react-native
Last synced: 5 months ago
JSON representation
The Native Toasts for React Native iOS
- Host: GitHub
- URL: https://github.com/luoxuhai/react-native-overlay
- Owner: luoxuhai
- License: mit
- Created: 2023-03-03T13:22:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-09T05:22:08.000Z (about 2 years ago)
- Last Synced: 2026-02-02T03:57:07.579Z (5 months ago)
- Topics: ios, react-native
- Language: Swift
- Homepage:
- Size: 349 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# react-native-overlay
## Installation
```sh
npm install @react-native-library/overlay
```
## Usage
### Toast
```ts
import { Toast } from '@react-native-library/overlay';
Toast.show({
title: "Hello";
message: "World";
/**
* 'done' | 'error'
*/
icon: 'done';
/**
* 'success' | 'warning' | 'error' | 'none';
*/
haptic: 'success';
})
```
### Alert
```ts
import { Alert } from '@react-native-library/overlay';
Alert.show({
title: "Hello";
message: "World";
/**
* 'done' | 'error' | 'spinner'
*/
icon: 'done';
/**
* 'success' | 'warning' | 'error' | 'none';
*/
haptic: 'success';
/**
* Optional, duration in milliseconds
*/
duration: 2000;
})
Alert.dismissAll();
```
### Confetti
```ts
import { Confetti } from '@react-native-library/overlay';
Confetti.show({
/**
* Optional, duration in milliseconds
*/
duration: 2000;
})
```
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT