{"id":4199,"url":"https://github.com/onemolegames/react-native-toast-native","last_synced_at":"2025-08-04T00:32:28.027Z","repository":{"id":22027962,"uuid":"94858807","full_name":"onemolegames/react-native-toast-native","owner":"onemolegames","description":"A native and easy to use toast plugin for react-native","archived":false,"fork":false,"pushed_at":"2020-11-27T19:57:51.000Z","size":101,"stargazers_count":99,"open_issues_count":18,"forks_count":43,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-23T18:55:46.148Z","etag":null,"topics":["android","ios","react-native","toast"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/onemolegames.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":"2017-06-20T06:46:16.000Z","updated_at":"2024-10-23T11:43:41.000Z","dependencies_parsed_at":"2022-07-22T05:48:04.434Z","dependency_job_id":null,"html_url":"https://github.com/onemolegames/react-native-toast-native","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onemolegames/react-native-toast-native","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onemolegames%2Freact-native-toast-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onemolegames%2Freact-native-toast-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onemolegames%2Freact-native-toast-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onemolegames%2Freact-native-toast-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onemolegames","download_url":"https://codeload.github.com/onemolegames/react-native-toast-native/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onemolegames%2Freact-native-toast-native/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268634064,"owners_count":24281896,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","ios","react-native","toast"],"created_at":"2024-01-05T20:17:04.253Z","updated_at":"2025-08-04T00:32:27.467Z","avatar_url":"https://github.com/onemolegames.png","language":"Objective-C","funding_links":[],"categories":["Components","Others"],"sub_categories":["UI"],"readme":"  [![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/onemolegames/onemolegames)\n\n# react-native-toast-native\n  React Native Toast is a toast component for both Android and iOS. it uses [scalessec/Toast](https://github.com/scalessec/Toast) for iOS;\n\n     \n## Demo:\n  ![](test.gif)\n\n## Getting started\n\n`$ npm install react-native-toast-native --save`\n\n### Mostly automatic installation\n\n`$ react-native link react-native-toast-native`\n\n### Manual installation\n\n\n#### iOS (CocoaPods)\n\nAdd the following to your podfile:\n```\npod 'RNToastNative', :path =\u003e '../node_modules/react-native-toast-native/ios`\n```\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `react-native-toast-native` and add `RNToastNative.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNToastNative.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainActivity.java`\n  - Add `import com.toast.RCTToastPackage;` to the imports at the top of the file\n  - Add `new RCTToastPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':react-native-toast-native'\n    project(':react-native-toast-native').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-toast-native/android')\n  \t```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n        compile project(':react-native-toast-native')\n  \t```\n\n  ## Usage\n  \n  It's just the same as [ToastAndroid](http://facebook.github.io/react-native/docs/toastandroid.html)\n  \n  ```javascript\n  import Toast from 'react-native-toast-native';\n  \n  Toast.show(); // Default toast message is shown.\n  Toast.show('This is a toast.'); // Specific message is shown with default duration(\"SHORT\") and poistion(\"TOP\") and styles.\n  Toast.show('This is a long toast.',Toast.LONG); //Specific message and duration are shown with default position and styles.\n  ```\n  It is higly customasible. Just provide a style object as a parameter.\n  example:\n   ```javascript\n  import Toast from 'react-native-toast-native';\n    const styles={\n                    width,\n                    height,\n                    backgroundColor,\n                    color,\n                    borderWidth,\n                    borderColor,\n                    borderRadius\n    }\n    \n    Toast.show('This is a long toast.',Toast.SHORT,Toast.TOP,styles); \n    // Customizable toast message is shown with specific message,duration and position.\n  ```\n   \n    \n  ## Options\n You can style the toast with below options;\n  Android:\n  ```javascript\n  {\n                width,\n                height,\n                backgroundColor,\n                color,\n                borderWidth,\n                paddingLeft,\n                paddingRight,\n                paddingBottom,\n                paddingTop,\n                fontSize,\n                lineHeight,\n                xOffset,\n                yOffset,\n                letterSpacing,\n                fontWeight\n  }\n  ```\n  Ios:\n  ```javascript\n    {\n                    width,\n                    height,\n                    backgroundColor,\n                    color,\n                    borderWidth,\n                    borderColor,\n                    borderRadius\n    }\n    \n```\n    \n  \n  if you want to make a customizable toast,you add an object like above to `show` and `showGravity`\n  \n  #### Example usage:\n  \n  ```javascript\n  import Toast from 'react-native-toast-native';\n  import {Platform} from 'react-native';\n  const style={\n                               backgroundColor: \"#4ADDFB\",\n                               width: 300,\n                               height: Platform.OS === (\"ios\") ? 50 : 100,\n                               color: \"#ffffff\",\n                               fontSize: 15,\n                               lineHeight: 2,\n                               lines: 4,\n                               borderRadius: 15,\n                               fontWeight: \"bold\",\n                               yOffset: 40\n                           };\n    Toast.show(message, Toast.SHORT, Toast.TOP,style);\n  \n \n  ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonemolegames%2Freact-native-toast-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonemolegames%2Freact-native-toast-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonemolegames%2Freact-native-toast-native/lists"}