{"id":18725494,"url":"https://github.com/jacklam718/react-native-modal-component","last_synced_at":"2025-04-12T16:08:18.651Z","repository":{"id":57338394,"uuid":"82442486","full_name":"jacklam718/react-native-modal-component","owner":"jacklam718","description":"React Native Modal for IOS and Android","archived":false,"fork":false,"pushed_at":"2017-09-16T09:52:06.000Z","size":669,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-09T03:25:23.564Z","etag":null,"topics":["dialog","modal","react-native-dialog","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/jacklam718.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-02-19T07:23:03.000Z","updated_at":"2019-11-29T20:35:38.000Z","dependencies_parsed_at":"2022-08-31T06:01:03.699Z","dependency_job_id":null,"html_url":"https://github.com/jacklam718/react-native-modal-component","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklam718%2Freact-native-modal-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklam718%2Freact-native-modal-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklam718%2Freact-native-modal-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklam718%2Freact-native-modal-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacklam718","download_url":"https://codeload.github.com/jacklam718/react-native-modal-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223527705,"owners_count":17160091,"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":["dialog","modal","react-native-dialog","react-native-modal"],"created_at":"2024-11-07T14:10:28.609Z","updated_at":"2024-11-07T14:10:29.278Z","avatar_url":"https://github.com/jacklam718.png","language":"JavaScript","readme":"# React Native Modal Component\nReact Native Modal Component for iOS \u0026 Android.\n\nPull request are welcomed. Please follow the Airbnb style guide [Airbnb JavaScript](https://github.com/airbnb/javascript)\n\n[Try it with Exponent](https://exp.host/@jacklam718/modal-example)\n\n\u003c!-- \u003cimg src=\"https://raw.githubusercontent.com/jacklam718/react-native-modal-component/master/.github/modal-demo.png\" width=\"250\"\u003e --\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/jacklam718/react-native-modal-component/master/.github/modal-demo.gif\" width=\"250\"\u003e\n\n## Installation\n##### yarn\n`yarn add react-native-modal-component`\n##### npm\n`npm install --save react-native-modal-component`\n\n## peerDependencies\n* react-native-deprecated-custom-components \u003e= ^0.1.1\n\n## Usage with ModalComponent\n```javascript\nimport { View, Text, TouchableOpacity } from 'react-native';\nimport ModalComponent from 'react-native-modal-component';\n```\n\n##### Modal content\n```javascript\nconst content = (\n  \u003cView style={{ flex: 1, justifyContent: 'center', padding: 20, backgroundColor: 'rgba(0, 0, 0, 0.2)' }}\u003e\n    \u003cView style={{ padding: 30, backgroundColor: '#fff', height: undefined, width: undefined }}\u003e\n      \u003cText style={{ color: '#000' }}\u003e\n        React Native Modal Component{'\\n'}\n      \u003c/Text\u003e\n    \u003c/View\u003e\n  \u003c/View\u003e\n);\n```\n\n```javascript\n\u003cModalComponent\n  ref={(modal) =\u003e { this.modal = modal; }}\n  content={content}\n  dismissOnHardwareBackPress\n  showCloseButton={false}\n  leftItem={{\n    title: 'CLOSE',\n    layout: 'title',\n    onPress: () =\u003e {\n      this.modal.dismiss(() =\u003e {\n        console.log('callback');\n      });\n    },\n  }}\n\u003e\n  \u003cView style={{ flex: 1, backgroundColor: 'white' }}\u003e\n    \u003cTouchableOpacity onPress={() =\u003e { this.modal.show(); }} \u003e\n      \u003cText\u003eShow Modal\u003c/Text\u003e\n    \u003c/TouchableOpacity\u003e\n  \u003c/View\u003e\n\u003c/ModalComponent\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklam718%2Freact-native-modal-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacklam718%2Freact-native-modal-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklam718%2Freact-native-modal-component/lists"}