{"id":20706238,"url":"https://github.com/rnheroes/react-native-toastable","last_synced_at":"2026-05-23T18:01:32.764Z","repository":{"id":152361202,"uuid":"624413040","full_name":"rnheroes/react-native-toastable","owner":"rnheroes","description":"🍞 Blazingly fast and fully customizable Toaster component for React Native","archived":false,"fork":false,"pushed_at":"2026-05-23T17:09:41.000Z","size":10219,"stargazers_count":144,"open_issues_count":4,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-23T17:17:40.484Z","etag":null,"topics":["react","react-native","react-native-toast","toastable","toaster"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-toastable","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rnheroes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-04-06T12:14:30.000Z","updated_at":"2026-05-23T17:09:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"fffbaf7f-ce83-4f86-b98e-579b6139ee23","html_url":"https://github.com/rnheroes/react-native-toastable","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rnheroes/react-native-toastable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnheroes%2Freact-native-toastable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnheroes%2Freact-native-toastable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnheroes%2Freact-native-toastable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnheroes%2Freact-native-toastable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnheroes","download_url":"https://codeload.github.com/rnheroes/react-native-toastable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnheroes%2Freact-native-toastable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33406444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["react","react-native","react-native-toast","toastable","toaster"],"created_at":"2024-11-17T01:22:03.746Z","updated_at":"2026-05-23T18:01:32.731Z","avatar_url":"https://github.com/rnheroes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-toastable\n\n[![npm](https://img.shields.io/npm/dm/react-native-toastable)](https://www.npmjs.com/package/react-native-toastable)\n![npm bundle size](https://img.shields.io/bundlephobia/min/react-native-toastable)\n[![HitCount](https://hits.dwyl.com/rnheroes/react-native-toastable.svg?style=flat-square\u0026show=unique)](http://hits.dwyl.com/rnheroes/react-native-toastable)\n\n🍞 Blazingly fast and fully customizable Toaster component for React Native\n\n- Supports queuinge, so you can display multiple toasts in succession without having to worry about them overlapping or interfering with each other\n- Fully typed, using TypeScript\n- Supports swipe to dismiss multiple directions (left, right, up)\n- Performant, using native animations and avoiding unnecessary re-renders\n- Zero external dependencies\n- Highly customizable, allowing you to tailor it to fit your specific needs\n\n\nhttps://user-images.githubusercontent.com/43743872/230865010-6c1c7890-2eec-47c1-bbe4-44c6c6379037.mp4\n\n\n## Installation\n\n```sh\nyarn add react-native-toastable\n```\n\nor\n\n```sh\nnpm install react-native-toastable\n```\n\n## Usage\nPlace `Toastable` component at the root of your app, and import `showToastable` function anywhere in your app to show or `hideToastable` to hide toast.\n\nNote: **If you need to use top inset of the device, Toastable must be child of `SafeAreaProvider`, otherwise you can use any value for `offset` prop, default is `56`.**\n\n```js\nimport { View } from 'react-native';\nimport { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';\nimport Toastable from 'react-native-toastable';\n\nexport default function App() {\n    return (\n        \u003cSafeAreaProvider\u003e\n            \u003cRootNavigation /\u003e\n        \u003c/SafeAreaProvider\u003e\n    );\n}\n\nexport default function RootNavigation() {\n    const { top } = useSafeAreaInsets();\n\n    return (\n        \u003cView style={{ flex:1 }}\u003e\n            \u003cNavigationContainer /\u003e\n            \u003cToastable\n                statusMap={{\n                    success: 'red'\n                    danger: 'yellow'\n                    warning: 'green'\n                    info: 'blue'\n                }}\n                offset={top}\n            /\u003e\n        \u003c/View\u003e\n    );\n}\n\nimport { View, Button } from 'react-native';\nimport { hideToastable, showToastable } from 'react-native-toastable';\n\nexport default function HomeScreen() {\n    return (\n        \u003cView style={{flex:1}}\u003e\n            \u003cButton\n                title=\"Show Toastable\"\n                onPress={() =\u003e showToastable({ message: 'React Native Heroes is awesome! 🚀', status:'success' })}\n            /\u003e\n            \u003cButton\n                title=\"Hide Toastable\"\n                onPress={() =\u003e hideToastable()}\n            /\u003e\n        \u003c/View\u003e\n    );\n}\n```\n\n\n## Props\nInherit all other props from `ToastableBodyParams` interface. Except `backgroundColor`, `status`, `message`, `onPress`, `contentStyle` props.\n\n| Property            | Type                 | Description                                                                                             | Default                                                   |\n|---------------------|----------------------|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|\n| statusMap           | `StatusMap`            | Status map, used to determine background color based on status                                         | `success: '#00BFA6', danger: '#FF5252', warning: '#FFD600', info: '#2962FF'` |\n| onToastableHide     | `Func`           | Callback when toast is dismissed                                                                        | `undefined`                                                       |\n| containerStyle      | `ViewProps['style']`   | Container style for toast container                                                                     | `undefined`                                                       |\nposition | `'top' \\| 'center'` | Toast position. | `'top'` |\noffset | `number` | Toast offset. | `56` |\n\n## ToastableBodyParams\n\n| Params         | Type                                                      | Description                                                                                                                    | Default   |\n| ---------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------- |\n| renderContent    | `(props: ToastableBodyParams) =\u003e React.ReactNode`         | Render custom content, if this is set, message will be ignored.                                                               | `undefined`         |\n| contentStyle     | `ViewProps['style']`                                      | Custom content style.                                                                                                           | `undefined` |\n| backgroundColor  | `ColorValue`                                              | Custom background color, if this is set, status will be ignored.                                                               | `undefined` |\n| status           | `ToastableMessageStatus`                                  | Message status, this will be used to determine background color based on `statusMap` prop.                                     | `'info'`   |\n| message          | `TextProps['children']`                                    | Message to be displayed.                                                                                                         | `undefined`      |\n| onPress          | `Func`                                              | On press callback.                                                                                                              | `undefined` |\n| duration         | `number`                                                  | Duration in milliseconds.                                                                                                       | `3000`    |\n| alwaysVisible    | `boolean`                                                 | Make toast always visible, even when there is a new toast.                                                                       | `false`   |\n| animationOutTiming | `number`                                                | Animation timing for toast out in milliseconds.                                                                                 | `300`     |\n| animationInTiming  | `number`                                                | Animation timing for toast in in milliseconds.                                                                                  | `300`     |\n| swipeDirection   | `'up' \\| 'left' \\| 'right' \\| Array\u003c'up' \\| 'left' \\| 'right'\u003e` | Swipe direction to dismiss toast.                                                                                               | `'up'`    |\ntitleColor | `ColorValue` | Custom title color, if this is set. | `'#FFFFFF'` | \n| messageColor | `ColorValue` | Custom message color, if this is set. | `'#FFFFFF'` |\ntitleStyle | `TextStyle` | Custom title style. | `undefined` |\nmessageStyle | `TextStyle` | Custom message style. | `undefined` |\nposition | `'top' \\| 'bottom'\\| 'center'` | Toast position. | `'top'` |\noffset | `number` | Toast offset. | `56` |\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## Roadmap\n\n- Add more examples\n- Support animationIn and animationOut props\n- Support stackable toasts\n- Support custom animations\n- Add custom status support\n\n## Inspiration\n\n- [react-native-modal](https://github.com/react-native-modal/react-native-modal)\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnheroes%2Freact-native-toastable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnheroes%2Freact-native-toastable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnheroes%2Freact-native-toastable/lists"}