{"id":28284670,"url":"https://github.com/m-julius/react-native-modal-bottom-alert","last_synced_at":"2025-10-18T20:39:11.215Z","repository":{"id":57338390,"uuid":"333452854","full_name":"M-Julius/react-native-modal-bottom-alert","owner":"M-Julius","description":"This package for react native, bottom alert with animation","archived":false,"fork":false,"pushed_at":"2021-02-04T09:19:58.000Z","size":3445,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T18:08:07.021Z","etag":null,"topics":["alert","bottom-alert","lottie-react-native","react","react-native","react-native-alert","react-native-modal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/M-Julius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-27T14:47:18.000Z","updated_at":"2022-08-31T10:27:28.000Z","dependencies_parsed_at":"2022-08-31T06:01:02.931Z","dependency_job_id":null,"html_url":"https://github.com/M-Julius/react-native-modal-bottom-alert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/M-Julius/react-native-modal-bottom-alert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M-Julius%2Freact-native-modal-bottom-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M-Julius%2Freact-native-modal-bottom-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M-Julius%2Freact-native-modal-bottom-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M-Julius%2Freact-native-modal-bottom-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/M-Julius","download_url":"https://codeload.github.com/M-Julius/react-native-modal-bottom-alert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M-Julius%2Freact-native-modal-bottom-alert/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261528683,"owners_count":23172755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alert","bottom-alert","lottie-react-native","react","react-native","react-native-alert","react-native-modal"],"created_at":"2025-05-21T17:14:41.077Z","updated_at":"2025-10-18T20:39:06.181Z","avatar_url":"https://github.com/M-Julius.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-modal-bottom-alert\n\n\n![alt text](./sample.gif)\n## Getting Started\n\n- [Installation](#installation)\n- [Basic Usage](#basic-usage)\n- [Set Global](#set-global-alert)\n- [Props](#props)\n\n## Installation\n```bash\n$ yarn add react-native-modal-bottom-alert lottie-react-native\n```\nOr\n```bash\n$ npm install react-native-modal-bottom-alert lottie-react-native --save\n```\n\n\n## Basic Usage\n```javascript\nimport { BottomAlert } from 'react-native-modal-bottom-alert';\n\nonOpenAlert() {\n    this.modalBottom.onOpenAlert('info', 'This Title', 'This Message Example Info')\n}\n\nonOpenAlertButtonPressed() {\n    // onOpenAlert parameters: type, title, message, function\n    // parameter type: 'success', 'info', 'error'\n    // parameter title: 'string'\n    // parameter message: 'string'\n    // parameter action: function, default null'\n    this.modalBottom.onOpenAlert('error', 'This Title', 'This Message Example Error', () =\u003e console.log('This Button Try Again Pressed'))\n}\n\nreturn (\n    \u003c\u003e\n        \u003cButton\n          title={'Open Alert'}\n          onPress={() =\u003e this.onOpenAlert()}\n        /\u003e\n        \u003cButton\n          title={'Open Alert Button Preesed With Action'}\n          onPress={() =\u003e this.onOpenAlertButtonPressed()}\n        /\u003e\n        \u003cBottomAlert\n            ref={(ref) =\u003e this.modalBottom = ref}\n        /\u003e\n    \u003c/\u003e\n)\n```\n\n## Set Global Alert\n\n### 1. Add Modal Bottom Alert on Root App \n```js\n// Root.js\nimport store from './reduxStore';\nimport React from 'react';\nimport { Provider } from 'react-redux';\nimport { useRefBottomAlert, BottomAlert } from 'react-native-modal-bottom-alert'; // Add This For Set Alert\n\nlet App = () =\u003e (\n  \u003cNavigator\u003e\n    \u003cMainScreen /\u003e\n    \u003cOtherScreen /\u003e\n  \u003c/Navigator\u003e\n);\n\nconst Root = () =\u003e (\n  \u003cProvider store={store}\u003e\n    \u003cApp /\u003e\n    {/* Add This on root app */}\n    \u003cBottomAlert ref={(ref) =\u003e useRefBottomAlert(ref) }/\u003e \n  \u003c/Provider\u003e\n);\n```\n\n### 2. Add on your screen or other function\n```js\n// Screen.js\nimport React, { Component } from 'react';\nimport { StyleSheet, Text, View, Button } from 'react-native';\nimport { showBottomAlert } from 'react-native-modal-bottom-alert'; // Add This On Your Screen For Call Alert\n\nexport default class App extends Component {\n\n  onOpenAlert() {\n    showBottomAlert('info', 'This Title', 'This Message Example Info', () =\u003e this.onDonePress())\n  }\n\n  onDonePress = () =\u003e {\n    console.log('Pressed')\n  }\n\n\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cText style={styles.welcome}\u003eModal Bottom Alert example\u003c/Text\u003e\n        \u003cButton\n          title={'Info'}\n          onPress={() =\u003e this.onOpenAlert()}\n        /\u003e\n        \u003cButton\n          title={'Error'}\n          onPress={() =\u003e showBottomAlert('error', 'This Title', 'This Message Example Error')}\n        /\u003e\n        \u003cButton\n          title={'Success'}\n          onPress={() =\u003e showBottomAlert('success', 'This Title', 'This Message Example Success')}\n        /\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'space-around',\n    alignItems: 'center',\n    backgroundColor: '#F5FCFF',\n  },\n  welcome: {\n    fontSize: 20,\n    textAlign: 'center',\n    margin: 10,\n  }\n});\n\n```\n\n\n## Props\n\n### Basic\n\n| Prop                     | Type      | Description                                    | Default |\n| :----------------------- | :-------: | :--------------------------------------------: | :------ |\n| statusBarTranslucent     | `boolean` | Status Bar Translucent                         | false   |\n| loopAnimation            | `boolean` | Animation Loop For Lottie Icon                 | false   |\n\n### Styling\n\n| Prop                   | Type     | Description                  | Default |\n| :--------------------- | :------: | :--------------------------: | :------ |\n| styleTextTitle         | `object` | Text Title Style             | -       |\n| styleTextMessage       | `object` | Text Message Style           | -       |\n| styleTextButton        | `object` | Text Button Style            | -       |\n| styleButton            | `object` | Button Style                 | -       |\n| styleContainerAlert    | `object` | Container Style Alert        | -       |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-julius%2Freact-native-modal-bottom-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-julius%2Freact-native-modal-bottom-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-julius%2Freact-native-modal-bottom-alert/lists"}