{"id":31985715,"url":"https://github.com/httnn/react-native-simple-modal","last_synced_at":"2025-10-15T06:34:46.997Z","repository":{"id":45033791,"uuid":"48535398","full_name":"httnn/react-native-simple-modal","owner":"httnn","description":"A simple JavaScript modal component for React Native.","archived":false,"fork":false,"pushed_at":"2021-08-28T09:37:19.000Z","size":335,"stargazers_count":184,"open_issues_count":10,"forks_count":49,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-03T00:58:14.913Z","etag":null,"topics":["modal","react-native","react-native-component"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/httnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-24T09:11:36.000Z","updated_at":"2024-06-06T03:15:06.000Z","dependencies_parsed_at":"2022-09-02T12:31:23.140Z","dependency_job_id":null,"html_url":"https://github.com/httnn/react-native-simple-modal","commit_stats":null,"previous_names":["bodyflex/react-native-simple-modal","httnn/react-native-simple-modal","maxjvh/react-native-simple-modal"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/httnn/react-native-simple-modal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httnn%2Freact-native-simple-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httnn%2Freact-native-simple-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httnn%2Freact-native-simple-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httnn%2Freact-native-simple-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/httnn","download_url":"https://codeload.github.com/httnn/react-native-simple-modal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httnn%2Freact-native-simple-modal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279026538,"owners_count":26088226,"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-14T02:00:06.444Z","response_time":60,"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":["modal","react-native","react-native-component"],"created_at":"2025-10-15T06:34:43.463Z","updated_at":"2025-10-15T06:34:46.986Z","avatar_url":"https://github.com/httnn.png","language":"JavaScript","readme":"# react-native-simple-modal\n\nA simple JavaScript modal component for React Native. Works on both iOS and Android.\n\n**Looking for maintainers! I'm not actively developing with React Native anymore and I don't have much time to keep this library up-to-date. If you're interested, hit me up: max.huttunen@gmail.com**\n\n\u003cimg src=\"https://i.imgur.com/EiwkCWn.gif\" width=\"300\" /\u003e\n\n## Installation\n\n`npm install react-native-simple-modal --save`\n\n## Usage\n\nSee example. Make sure to put the `\u003cModal\u003e` at the end of the render function so that it renders above the content!\n\n### Properties and their default values\n\n```javascript\nimport Modal from \"react-native-simple-modal\";\n\n\u003cModal\n  animationDuration={200}\n  animationTension={40}\n  closeOnTouchOutside={true}\n  containerProps={undefined}\n  containerStyle={{\n    justifyContent: \"center\"\n  }}\n  disableOnBackPress={false}\n  modalDidClose={() =\u003e undefined}\n  modalDidOpen={() =\u003e undefined}\n  modalProps={undefined}\n  modalStyle={{\n    borderRadius: 2,\n    margin: 20,\n    padding: 10,\n    backgroundColor: \"#F5F5F5\"\n  }}\n  offset={0}\n  open={false}\n  overlayStyle={{\n    backgroundColor: \"rgba(0, 0, 0, 0.75)\",\n    flex: 1\n  }}\n/\u003e;\n```\n\n## Example\n\n```javascript\nimport React from \"react\";\nimport { Text, TouchableOpacity, View } from \"react-native\";\nimport Modal from \"react-native-simple-modal\";\n\nexport default class App extends React.Component {\n  state = { open: false };\n\n  modalDidOpen = () =\u003e console.log(\"Modal did open.\");\n\n  modalDidClose = () =\u003e {\n    this.setState({ open: false });\n    console.log(\"Modal did close.\");\n  };\n\n  moveUp = () =\u003e this.setState({ offset: -100 });\n\n  resetPosition = () =\u003e this.setState({ offset: 0 });\n\n  openModal = () =\u003e this.setState({ open: true });\n\n  closeModal = () =\u003e this.setState({ open: false });\n\n  render() {\n    return (\n      \u003cView style={{ flex: 1, justifyContent: \"center\", alignItems: \"center\" }}\u003e\n        \u003cTouchableOpacity onPress={this.openModal}\u003e\n          \u003cText\u003eOpen modal\u003c/Text\u003e\n        \u003c/TouchableOpacity\u003e\n        \u003cModal\n          offset={this.state.offset}\n          open={this.state.open}\n          modalDidOpen={this.modalDidOpen}\n          modalDidClose={this.modalDidClose}\n          style={{ alignItems: \"center\" }}\n        \u003e\n          \u003cView style={{ alignItems: \"center\" }}\u003e\n            \u003cText style={{ fontSize: 20, marginBottom: 10 }}\u003eHello world!\u003c/Text\u003e\n            \u003cTouchableOpacity style={{ margin: 5 }} onPress={this.moveUp}\u003e\n              \u003cText\u003eMove modal up\u003c/Text\u003e\n            \u003c/TouchableOpacity\u003e\n            \u003cTouchableOpacity\n              style={{ margin: 5 }}\n              onPress={this.resetPosition}\n            \u003e\n              \u003cText\u003eReset modal position\u003c/Text\u003e\n            \u003c/TouchableOpacity\u003e\n            \u003cTouchableOpacity style={{ margin: 5 }} onPress={this.closeModal}\u003e\n              \u003cText\u003eClose modal\u003c/Text\u003e\n            \u003c/TouchableOpacity\u003e\n          \u003c/View\u003e\n        \u003c/Modal\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttnn%2Freact-native-simple-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttnn%2Freact-native-simple-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttnn%2Freact-native-simple-modal/lists"}