{"id":4137,"url":"https://github.com/douglasjunior/react-native-simple-dialogs","last_synced_at":"2025-05-14T20:05:57.972Z","repository":{"id":22011271,"uuid":"94703864","full_name":"douglasjunior/react-native-simple-dialogs","owner":"douglasjunior","description":"⚛ Cross-platform React Native dialogs based on the Modal component","archived":false,"fork":false,"pushed_at":"2025-04-12T01:14:13.000Z","size":1785,"stargazers_count":413,"open_issues_count":3,"forks_count":56,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T02:29:38.001Z","etag":null,"topics":["android","cross-platform","dialog","hacktoberfest","ios","modal","popup","react-native"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-simple-dialogs","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/douglasjunior.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"douglasjunior","patreon":"douglasjunior","custom":"paypal.me/douglasnassif"}},"created_at":"2017-06-18T17:57:06.000Z","updated_at":"2025-04-06T13:07:45.000Z","dependencies_parsed_at":"2024-01-08T01:01:51.567Z","dependency_job_id":"30cb7857-1a8f-4dd9-8604-0b538a5e9609","html_url":"https://github.com/douglasjunior/react-native-simple-dialogs","commit_stats":{"total_commits":99,"total_committers":15,"mean_commits":6.6,"dds":0.5757575757575757,"last_synced_commit":"9b8777fbd80e1be2f9da4585c290fa2da738ba96"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasjunior%2Freact-native-simple-dialogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasjunior%2Freact-native-simple-dialogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasjunior%2Freact-native-simple-dialogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasjunior%2Freact-native-simple-dialogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglasjunior","download_url":"https://codeload.github.com/douglasjunior/react-native-simple-dialogs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590419,"owners_count":21129813,"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":["android","cross-platform","dialog","hacktoberfest","ios","modal","popup","react-native"],"created_at":"2024-01-05T20:17:02.259Z","updated_at":"2025-04-12T15:36:46.121Z","avatar_url":"https://github.com/douglasjunior.png","language":"TypeScript","readme":"# React Native Simple Dialogs\n\n[![License MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE)\n[![npm version](https://img.shields.io/npm/v/react-native-simple-dialogs.svg)](https://www.npmjs.com/package/react-native-simple-dialogs?activeTab=versions)\n[![npm downloads](https://img.shields.io/npm/dt/react-native-simple-dialogs.svg)](https://www.npmjs.com/package/react-native-simple-dialogs)\n\n⚛ Cross-platform React Native dialogs based on the Modal component.\n\n## Features\n\n- [Custom Dialog](#custom-dialog)\n- [Confirm Dialog](#confirm-dialog)\n- [Progress Dialog](#progress-dialog)\n\n## Expo Snack\nAn\n[Expo Demo Link](https://snack.expo.io/@douglasjunior/react-native-simple-dialogs-example)\n\n## Screenshots\n\n| Android | iOS |\n| - | - |\n| \u003cimg src='https://raw.githubusercontent.com/douglasjunior/react-native-simple-dialogs/master/screenshots/android-dialog.png' width='320' /\u003e | \u003cimg src='https://raw.githubusercontent.com/douglasjunior/react-native-simple-dialogs/master/screenshots/ios-dialog.png' width='320' /\u003e |\n| \u003cimg src='https://raw.githubusercontent.com/douglasjunior/react-native-simple-dialogs/master/screenshots/android-confirm.png' width='320' /\u003e | \u003cimg src='https://raw.githubusercontent.com/douglasjunior/react-native-simple-dialogs/master/screenshots/ios-confirm.png' width='320' /\u003e |\n| \u003cimg src='https://raw.githubusercontent.com/douglasjunior/react-native-simple-dialogs/master/screenshots/android-progress.png' width='320' /\u003e | \u003cimg src='https://raw.githubusercontent.com/douglasjunior/react-native-simple-dialogs/master/screenshots/ios-progress.png' width='320' /\u003e |\n\n## Requirements\n\n- React Native \u003e= 0.44.0\n\n## NOTES\n\n- for RN 0.58.0 or later use react-native-simple-dialogs@latest\n- for RN 0.56.0 ... 0.57.8 use react-native-simple-dialogs@1.0.0\n- for RN 0.44.0 ... 0.55.4, use react-native-simple-dialogs@0.3.1\n\n## Install\n\n```bash\n  yarn add react-native-simple-dialogs\n```\nOr\n```bash\n  npm i -S react-native-simple-dialogs\n```\n\n## Use\n\n### Custom Dialog\n\n```jsx\nimport { Dialog } from 'react-native-simple-dialogs';\n\n\u003cDialog\n    visible={this.state.dialogVisible}\n    title=\"Custom Dialog\"\n    onTouchOutside={() =\u003e this.setState({dialogVisible: false})} \u003e\n    \u003cView\u003e\n        // your content here\n    \u003c/View\u003e\n\u003c/Dialog\u003e\n```\n\n#### Available props\n\n| Name                        | Type                                                                                                | Default    | Description                                                                                                                                                 |\n| --------------------------- | --------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| visible                     | Boolean                                                                                             | false      | Show the modal?                                                                                                                                             |\n| onRequestClose              | Function                                                                                            | null       | Callback that's called when users taps the hardware back button on Android                                                                                  |\n| animationType               | Enum('none', 'slide', 'fade')                                                                       | 'none'     | Controls how the modal animates                                                                                                                             |\n| onShow                      | Function                                                                                            | null       | Callback that's called once the modal has been shown                                                                                                        |\n| onOrientationChange         | Function                                                                                            | null       | Callback that's called when the orientation change while the modal is being displayed on iOS                                                                |\n| supportedOrientations       | Array of Enum('portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right') | 'portrait' | Allowed orientation while modals is being shown. More info at [react-native docs](https://facebook.github.io/react-native/docs/modal#supportedorientations) |\n| statusBarTranslucent        | Boolean                                                                                             | null       | Determines whether your modal should go under the system statusbar. More info at [react-native docs](https://facebook.github.io/react-native/docs/modal#statusbartranslucent-android) |\n| onTouchOutside              | Function                                                                                            | null       | Callbac that's called when users tap outside the shown modal                                                                                                |\n| title                       | String                                                                                              | null       | Modal's title                                                                                                                                               |\n| titleStyle                  | [Text StyleSheet](https://facebook.github.io/react-native/docs/text-style-props)                    | null       | Custom text style object for modal's title                                                                                                                  |\n| dialogStyle                 | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props)                    | null       | Custom view style for dialog box                                                                                                                            |\n| contentStyle                | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props)                    | null       | Custom view style for dialog content wrapper                                                                                                                |\n| buttonsStyle                | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props)                    | null       | Custom view style for dialog button wrapper                                                                                                                 |\n| overlayStyle                | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props)                    | null       | Custom view style for dialog overlay                                                                                                                        |\n| buttons                     | React Node                                                                                     | null       | Modal button component                                                                                                                                      |\n| keyboardDismissMode         | Enum('none', 'on-drag', 'interactive')                                                              | null       | [Determines whether the keyboard gets dismissed in response to a drag.](https://facebook.github.io/react-native/docs/scrollview#keyboarddismissmode)        |\n| keyboardShouldPersistTaps   | Enum('always', 'never', 'handled', false, true)                                                     | null       | [Determines when the keyboard should stay visible after a tap.](https://facebook.github.io/react-native/docs/scrollview#keyboardshouldpersisttaps)          |\n\n### Confirm Dialog\n\n```jsx\nimport { ConfirmDialog } from 'react-native-simple-dialogs';\n\n// with message\n\u003cConfirmDialog\n    title=\"Confirm Dialog\"\n    message=\"Are you sure about that?\"\n    visible={this.state.dialogVisible}\n    onTouchOutside={() =\u003e this.setState({dialogVisible: false})}\n    positiveButton={{\n        title: \"YES\",\n        onPress: () =\u003e alert(\"Yes touched!\")\n    }}\n    negativeButton={{\n        title: \"NO\",\n        onPress: () =\u003e alert(\"No touched!\")\n    }}\n/\u003e\n\n// with custom content\n\u003cConfirmDialog\n    title=\"Confirm Dialog\"\n    visible={this.state.dialogVisible}\n    onTouchOutside={() =\u003e this.setState({dialogVisible: false})}\n    positiveButton={{\n        title: \"OK\",\n        onPress: () =\u003e alert(\"Ok touched!\")\n    }} \u003e\n    \u003cView\u003e\n        // your content here\n    \u003c/View\u003e\n\u003c/ConfirmDialog\u003e\n```\n\n#### Available props\n\n| Name              | Type                                                                             | Default      | Description                                                                                   |\n| ----------------- | -------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------- |\n| ...{Dialog.props} | Dialog Props                                                                     | null         | Same props as Dialog Component                                                                |\n| message           | String                                                                           | null         | Message shown in the confirm dialog                                                           |\n| messageStyle      | [Text StyleSheet](https://facebook.github.io/react-native/docs/text-style-props) | null         | Custom text style for message                                                                 |\n| negativeButton    | Button Props                                                                     | null         | Button element object to describe the negative button. See below for detailed shape of button |\n| positiveButton    | Button Props                                                                     | **REQUIRED** | Button element object to describe the positive button. See below for detailed shape of button |\n\n##### Button props\n\n| Name       | Type                                                                             | Default      |\n| ---------- | -------------------------------------------------------------------------------- | ------------ |\n| title      | String                                                                           | **REQUIRED** |\n| onPress    | Function                                                                         | **REQUIRED** |\n| disabled   | Boolean                                                                          | null         |\n| titleStyle | [Text StyleSheet](https://facebook.github.io/react-native/docs/text-style-props) | null         |\n| style      | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null         |\n\n### Progress Dialog\n\n```jsx\nimport { ProgressDialog } from 'react-native-simple-dialogs';\n\n\u003cProgressDialog\n    visible={this.state.progressVisible}\n    title=\"Progress Dialog\"\n    message=\"Please, wait...\"\n/\u003e\n```\n\n#### Available props\n\n| Name                   | Type                                                                             | Default      | Description                                             |\n| ---------------------- | -------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------- |\n| ...{Dialog.props}      | Dialog Props                                                                     | null         | Same props as Dialog Component                          |\n| message                | String                                                                           | null         | Message shown in the progress dialog                    |\n| messageStyle           | [Text StyleSheet](https://facebook.github.io/react-native/docs/text-style-props) | null         | Custom text style for message                           |\n| activityIndicatorColor | color                                                                            | null         | The foreground color of the spinner                     |\n| activityIndicatorSize  | enum('small', 'large'), number                                                   | null         | Size of the indicator. Number only supported on Android |\n| activityIndicatorStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null         | Custom style for the activity indicator                 |\n\nMore info on the [sample project](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/Sample/src/App.js).\n\n## Contribute\n\nNew features, bug fixes and improvements are welcome! For questions and suggestions use the [issues](https://github.com/douglasjunior/react-native-simple-dialogs/issues).\n\n\u003ca href=\"https://www.patreon.com/douglasjunior\"\u003e\u003cimg src=\"http://i.imgur.com/xEO164Z.png\" alt=\"Become a Patron!\" width=\"200\" /\u003e\u003c/a\u003e\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=E32BUP77SVBA2)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=douglasjunior/react-native-simple-dialogs\u0026type=Date)](https://star-history.com/#douglasjunior/react-native-simple-dialogs)\n\n## License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2017 Douglas Nassif Roma Junior\n```\n\nSee the full [license file](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE).\n","funding_links":["https://github.com/sponsors/douglasjunior","https://patreon.com/douglasjunior","paypal.me/douglasnassif","https://www.patreon.com/douglasjunior","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=E32BUP77SVBA2"],"categories":["Components","Others","TypeScript"],"sub_categories":["UI","Dialog/Modal/Alert"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasjunior%2Freact-native-simple-dialogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglasjunior%2Freact-native-simple-dialogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasjunior%2Freact-native-simple-dialogs/lists"}