{"id":18338698,"url":"https://github.com/tableflip/react-native-toaster","last_synced_at":"2025-10-23T18:56:59.786Z","repository":{"id":57340933,"uuid":"75101252","full_name":"tableflip/react-native-toaster","owner":"tableflip","description":"Simple top-pop toast feedback messages for React Native, also Redux compatible","archived":false,"fork":false,"pushed_at":"2023-04-17T17:36:24.000Z","size":64,"stargazers_count":85,"open_issues_count":17,"forks_count":29,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-18T23:57:27.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tableflip.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-29T16:40:03.000Z","updated_at":"2024-07-27T13:58:17.000Z","dependencies_parsed_at":"2024-06-18T16:46:18.816Z","dependency_job_id":"8493c8e8-7565-4548-ab6c-2225c80745c0","html_url":"https://github.com/tableflip/react-native-toaster","commit_stats":{"total_commits":35,"total_committers":4,"mean_commits":8.75,"dds":"0.19999999999999996","last_synced_commit":"8302cf4d08595583cade30fca143abe14e168e4f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/tableflip/react-native-toaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Freact-native-toaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Freact-native-toaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Freact-native-toaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Freact-native-toaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tableflip","download_url":"https://codeload.github.com/tableflip/react-native-toaster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Freact-native-toaster/sbom","scorecard":{"id":865106,"data":{"date":"2025-08-18","repo":{"name":"github.com/tableflip/react-native-toaster","commit":"8302cf4d08595583cade30fca143abe14e168e4f"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Info: FSF or OSI recognized license: ISC License: LICENCE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"26 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T02:29:01.813Z","repository_id":57340933,"created_at":"2025-08-24T02:29:01.813Z","updated_at":"2025-08-24T02:29:01.813Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280675593,"owners_count":26371564,"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-10-23T02:00:06.710Z","response_time":142,"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":[],"created_at":"2024-11-05T20:14:54.150Z","updated_at":"2025-10-23T18:56:59.743Z","avatar_url":"https://github.com/tableflip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-toaster [![dependencies Status](https://david-dm.org/tableflip/react-native-toaster/status.svg)](https://david-dm.org/tableflip/react-native-toaster)\n\nSimple top-pop toast feedback messages for React Native.\n\n![demo](https://cloud.githubusercontent.com/assets/152863/20730697/fb6bf4e0-b67e-11e6-9964-591fb7a1dc78.gif)\n\n## Example\n\n```js\nimport React, { Component } from 'react'\nimport { View } from 'react-native'\nimport Toaster, { ToastStyles } from 'react-native-toaster'\n\nclass App extends Component {\n  constructor (props) {\n    super(props)\n    this.state = { message: null }\n\n    const messages = [\n      { text: 'FYI' },\n      { text: 'Hooray!', styles: ToastStyles.success },\n      { text: 'Eek', styles: ToastStyles.warning },\n      { text: 'Oh noe!', styles: ToastStyles.error }\n    ]\n\n    // Send each message 1 second apart\n    messages.forEach((message, i) =\u003e {\n      setTimeout(() =\u003e this.setState({ message }), i * 1000)\n    })\n  }\n\n  render () {\n    return (\n      \u003cView\u003e\n        \u003cToaster message={this.state.message} /\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n```\n\n## Properties\n\n| Prop  | Default  | Type | Description |\n| :------------ |:---------------:| :---------------:| :-----|\n| [message](#message) | - | `object` / `array` | The current toast message to display ([see below](#message)). Multiple messages are shown one at a time after each other. |\n| onShow | null | `func` | Callback called when a message is shown, passed the message as the first parameter |\n| onHide | null | `func` | Callback called when a message is hidden, passed the message as the first parameter |\n| onPress | null | `func` | Callback called when the user press a message, passed the message as the first parameter |\n\n### `message`\n\n| Prop  | Default  | Type | Description |\n| :------------ |:---------------:| :---------------:| :-----|\n| [text](#text) | - | `string` / `node` | Text message to display, or custom element ([see below](#text)) |\n| [styles](#styles) | ToastStyles.info | `object` | Styles for the container and text ([see below](#styles)) |\n| duration | 3000 | `number` | Duration in ms the toast is shown for |\n| height | 100 | `number` | Height of the toast message |\n| onShow | null | `func` | Callback called when this message is shown |\n| onHide | null | `func` | Callback called when this message is hidden |\n| onPress | null | `func` | Callback called when this message is pressed |\n\n#### `text`\n\nThe `text` property can be either a simple string or a custom element to be rendered. If a string is passed, it is wrapped in a container `View` and `Text` element:\n\n```js\ntext = (\n  \u003cView\u003e\n    \u003cText\u003e{text}\u003c/Text\u003e\n  \u003c/View\u003e\n)\n```\n\nBoth the container `View` and `Text` element can be styled using the `styles` property.\n\n#### `styles`\n\nAn object used to style the container `View` and `Text` elements when `message.text` is a `string`. Defaults to `ToastStyles.info` if not set and should look like this:\n\n```js\n{\n  container: {\n    backgroundColor: '#2487DB',\n    paddingTop: 25,\n    paddingRight: 15,\n    paddingBottom: 15,\n    paddingLeft: 15\n  },\n  text: {\n    color: '#ffffff',\n    fontWeight: 'bold'\n  }\n}\n```\n\n## Example with Redux\n\n**App.jsx**\n\n```js\nimport React, { Component } from 'react'\nimport { View } from 'react-native'\nimport { connect } from 'react-redux'\nimport Toaster from 'react-native-toaster'\n\nclass App extends Component {\n  render () {\n    return (\n      \u003cView\u003e\n        \u003cToaster message={this.props.toastMessage} /\u003e\n        \u003cLoginForm /\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n\nconst mapStateToProps = ({ toastMessage }) =\u003e ({ toastMessage })\nexport default connect(mapStateToProps)(App)\n```\n\n**LoginForm.jsx**\n\n```js\nimport React, { Component } from 'react'\nimport { View, TextInput, TouchableHighlight } from 'react-native'\nimport { connect } from 'react-redux'\nimport { ToastStyles } from 'react-native-toaster'\nimport { addToast } from './redux/actions'\nimport styles from './styles'\n\nclass LoginForm extends Component {\n  state = { email: '', password: '' }\n\n  onEmailChange = (email) =\u003e this.setState({ email })\n  onPasswordChange = (password) =\u003e this.setState({ password })\n\n  onLoginButtonPress = () =\u003e {\n    const { email, password } = this.state\n\n    // TODO: Send to server, on response call addToast:\n\n    this.props.addToast({\n      text: 'Successfully logged in',\n      styles: ToastStyles.success\n    })\n\n    // --- or ---\n\n    this.props.addToast({\n      text: 'Login failed, check your email or password',\n      styles: ToastStyles.error\n    })\n  }\n\n  render () {\n    return (\n      \u003cView\u003e\n        \u003cTextInput onChangeText={this.onEmailChange} value={this.state.email} placeholder='Email' /\u003e\n        \u003cTextInput onChangeText={this.onPasswordChange} value={this.state.password} placeholder='Password' /\u003e\n        \u003cTouchableHighlight onPress={this.onLoginButtonPress}\u003e\n          \u003cText\u003eLogin\u003c/Text\u003e\n        \u003c/TouchableHighlight\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n\nconst mapDispatchToProps = { addToast }\nexport default connect(null, mapDispatchToProps)(LoginForm)\n```\n\n**redux/actions.js**\n\n```js\nexport const ADD_TOAST = 'ADD_TOAST'\nexport function addToast (message) {\n  return { type: ADD_TOAST, message }\n}\n```\n\n**redux/reducers.js**\n\n```js\nimport { combineReducers } from 'redux'\nimport { ADD_TOAST } from './actions'\n\nfunction toastMessage (state = null, action) {\n  switch (action.type) {\n    case ADD_TOAST:\n      return action.message\n    default:\n      return state\n  }\n}\n\nexport default combineReducers({\n  appState,\n  toastMessage,\n  connect: (state = null) =\u003e state\n})\n```\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/tableflip/react-native-toaster/issues/new) or submit PRs.\n\n## License\n\n[ISC](LICENSE) © TABLEFLIP\n\n----\n\nA [(╯°□°）╯︵TABLEFLIP](https://tableflip.io) side project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Freact-native-toaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftableflip%2Freact-native-toaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Freact-native-toaster/lists"}