{"id":4354,"url":"https://github.com/bzurkow/swipeable-modal-react-native","last_synced_at":"2026-03-05T23:15:15.038Z","repository":{"id":57376110,"uuid":"158271364","full_name":"bzurkow/swipeable-modal-react-native","owner":"bzurkow","description":"A react-native modal component with built in swipe animations.","archived":false,"fork":false,"pushed_at":"2018-11-19T19:53:01.000Z","size":152,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-19T08:05:50.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bzurkow.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":"2018-11-19T18:23:22.000Z","updated_at":"2023-05-02T15:40:34.000Z","dependencies_parsed_at":"2022-09-02T19:32:09.420Z","dependency_job_id":null,"html_url":"https://github.com/bzurkow/swipeable-modal-react-native","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzurkow%2Fswipeable-modal-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzurkow%2Fswipeable-modal-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzurkow%2Fswipeable-modal-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzurkow%2Fswipeable-modal-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bzurkow","download_url":"https://codeload.github.com/bzurkow/swipeable-modal-react-native/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250515959,"owners_count":21443521,"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":[],"created_at":"2024-01-05T20:17:09.292Z","updated_at":"2026-03-05T23:15:10.019Z","avatar_url":"https://github.com/bzurkow.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"readme":"# About\n\nThis package delivers a lightweight \"pop up\" modal that can be swiped right or left. Each direction can receive it's own function to do whatever you would like it to!\n\n[Screenshot](./screenshots/ModalOpen.jpeg)\n[Screenshot](./screenshots/Right.jpeg)\n\n# Usage\n\n## Install\n```\nnpm install --save swipeable-modal-react-native\n```\n\n## Basic Set Up\n```\nimport React, { Component } from 'react';\nimport { Text, View } from 'react-native';\nimport PopUp from 'swipeable-modal-react-native';\n\nexport default class Something extends Component {\n  render() {\n\treturn (\n\t  \u003cView\u003e\n\t    \u003cPopUp\u003e\n\t      {/*\n\t      \tPut whatever you want to display in the modal here!\n\t      */}\n\t    \u003c/PopUp\u003e\n\t  \u003c/View\u003e\n\t)\n  }\n}\n```\n\nUnder the default settings, a button will be rendered like such:\n\n[Screenshot](./screenshots/DefaultButton.jpeg)\n\nThis can be disabled by props.\n\n# Props\n\n1. `showButton`\n2. `buttonText`\n3. `buttonColor`\n4. `buttonContainerStyle`\n5. `buttonTextStyle`\n6. `modalTransparent`\n7. `modalOpen`\n8. `animatedViewStyle`\n9. `modalOpenAnimation`\n10. `onSwipeRight`\n11. `onSwipeLeft`\n\n## 1. showButton\n\n* Default: `true`\n* Type: boolean\n* Use: Determines whether or not a button will render to open the modal\n\n## 2. buttonText\n* Default `Click Me!`\n* Type: string\n* Use: Sets the text to display in the button\n\n## 3. buttonColor\n* Default `#1BA9DF`\n* Type: string of hexcode or rgb value\n* Use: Sets the background color of the button. NOTE: this will be reset if backgroundColor is set in buttonContainerStyle.\n\n## 4. buttonContainerStyle\n* Default: `{backgroundColor: '#1BA9DF', borderRadius: 10}`\n* Type: object \n* Use: Sets the style properties of the button's `\u003cTouchableHighlight\u003e` container\n\n## 5. buttonTextStyle\n* Default: `{padding: 20, color: '#fff'}`\n* Type: object\n* Use: Sets the style properties of the button's `\u003cText\u003e` element\n\n## 6. modalTransparent\n* Default: `true`\n* Type: boolean\n* Use: If `true`, displays rendered content behind modal content. If `false`, blocks non-modal content\n\n## 7. modalOpen\n* Default: `false`\n* Type: boolean\n* Use: To trigger the modal's visibility. If you choose not render the button you have the option to initialize the compenent as true or open it as a side effect once. If the button is visible, you can reopen the modal as many times as you please.\n\n## 8. animatedViewStyle\n* Default: \n```\n\t{\n\t\tbackgroundColor: '#fff',\n\t\tborderRadius: 10,\n\t\theight: height-85,\n\t\twidth: width-50,\n\t\tmarginTop: 60,\n\t\tmarginBottom: 25,\n\t\tmarginLeft: 25,\n\t\tmarginRight: 25,\n\t}\n```\n* Type: object\n* Use: An animated view is used to display content. This sets that container's style property.\n\n## 9. modalOpenAnimation\n* Default: 'slide'\n* Type: Enum: `none`, `slide`, `fade`\n* Use: Sets the animation type of the modal content when it opens.\n\n## 10. onSwipeLeft\n* Default: undefined\n* Type: function\n* Use: Sets a function to be called when a user swipes left on the modal. You do not need to reset or close the modal on a swipe, that is done automatically.\n\n## 11. onSwipeRight\n* Default: undefined\n* Type: function\n* Use: Sets a function to be called when a user swipes right on the modal. You do not need to reset or close the modal on a swipe, that is done automatically.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzurkow%2Fswipeable-modal-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbzurkow%2Fswipeable-modal-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzurkow%2Fswipeable-modal-react-native/lists"}