{"id":3942,"url":"https://github.com/maxs15/react-native-modalbox","last_synced_at":"2025-05-12T09:22:40.380Z","repository":{"id":35094001,"uuid":"39258445","full_name":"maxs15/react-native-modalbox","owner":"maxs15","description":"A \u003cModal/\u003e component for react-native","archived":false,"fork":false,"pushed_at":"2024-12-15T09:14:54.000Z","size":2199,"stargazers_count":2910,"open_issues_count":161,"forks_count":504,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-23T02:57:16.087Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxs15.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","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,"publiccode":null,"codemeta":null}},"created_at":"2015-07-17T14:34:39.000Z","updated_at":"2025-04-16T04:54:55.000Z","dependencies_parsed_at":"2024-06-18T11:15:34.300Z","dependency_job_id":"25a70a83-dbf6-4600-8daf-0ad55d9c2032","html_url":"https://github.com/maxs15/react-native-modalbox","commit_stats":{"total_commits":172,"total_committers":35,"mean_commits":4.914285714285715,"dds":"0.41860465116279066","last_synced_commit":"879acfc5386f5a91ee91db398a36fe879609222d"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxs15%2Freact-native-modalbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxs15%2Freact-native-modalbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxs15%2Freact-native-modalbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxs15%2Freact-native-modalbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxs15","download_url":"https://codeload.github.com/maxs15/react-native-modalbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253217379,"owners_count":21873085,"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:16:56.023Z","updated_at":"2025-05-11T08:36:21.147Z","avatar_url":"https://github.com/maxs15.png","language":"JavaScript","readme":"# react-native-modalbox\n\n[![npm](https://img.shields.io/npm/dm/react-native-modalbox.svg?maxAge=2592000)]()\n[![npm](https://img.shields.io/npm/dt/react-native-modalbox.svg?maxAge=2592000)]()   \n\nA react native \u003cModal\u003e component, easy, fully customizable, implementing the 'swipe down to close' feature.\n\n## Wanna implement IAP in your beautiful modal? 👇\n\u003ca href=\"https://landing.iaphub.com/cc/react-native-modalbox\" title=\"IAPHUB\"\u003e\n\t\u003cimg width=882px src=\"https://www.iaphub.com/img/github/github-rn-ad.png\" alt=\"IAPHUB\"\u003e\n\u003c/a\u003e\n\u003cbr/\u003e\n\n## Preview\n![](https://i.imgur.com/QTAYh81.gif)\n![](http://i.imgur.com/3XULLt8.gif)\n\n## Install\n\n`npm install react-native-modalbox@latest --save`\n\n## Example\nCheck [index.js](https://github.com/maxs15/react-native-modalbox/blob/master/Example/index.ios.js) in the Example folder.\n\n## Version note\n| react-native | react-native-modalbox |\n| :------------ |:---------------:|\n| \u003c= 0.57 | \u003c= 1.6.0 |\n| \u003e= 0.58 | \u003e= 1.6.1 |\n\n## Properties\n\n| Prop  | Default  | Type | Description |\n| :------------ |:---------------:| :---------------:| :-----|\n| isOpen | false | `bool` | Open/close the modal, optional, you can use the open/close methods instead  |\n| isDisabled | false | `bool` | Disable any action on the modal (open, close, swipe)  |\n| backdropPressToClose | true | `bool` | Close the the modal by pressing on the backdrop |\n| swipeToClose | true | `bool` | Set to `true` to enable the swipe down to close feature |\n| swipeThreshold | 50 | `number` | The threshold to reach in pixels to close the modal |\n| swipeArea | - | `number` | The height in pixels of the swipeable area, window height by default |\n| position | center | `string` | Control the modal position using `top` or `center` or `bottom` |\n| entry | bottom | `string` | Control the modal entry position `top` or `bottom` |\n| backdrop | true | `bool` | Display a backdrop behind the modal |\n| backdropOpacity | 0.5| `number` | Opacity of the backdrop |\n| backdropColor | black| `string` | backgroundColor of the backdrop |\n| backdropContent | null| `ReactElement` | Add an element in the backdrop (a close button for example) |\n| animationDuration | 400| `number` | Duration of the animation |\n| easing | Easing.elastic(0.8) | `function` | Easing function applied to opening modal animation |\n| backButtonClose | false | `bool` | (Android only) Close modal when receiving back button event |\n| startOpen | false | `bool` | Allow modal to appear open without animation upon first mount |\n| coverScreen | false | `bool` | Will use RN `Modal` component to cover the entire screen wherever the modal is mounted in the component hierarchy |\n| keyboardTopOffset | ios:22, android:0 | `number` | This property prevent the modal to cover the ios status bar when the modal is scrolling up because the keyboard is opening |\n| useNativeDriver | true | `bool` | Enables the hardware acceleration to animate the modal. Please note that enabling this can cause some flashes in a weird way when animating |\n\n## Events\n\n| Prop  | Params  | Description |\n| :------------ |:---------------:| :---------------:|\n| onClosed | - | When the modal is close and the animation is done |\n| onOpened | - | When the modal is open and the animation is done |\n| onClosingState | state `bool` | When the state of the swipe to close feature has changed (usefull to change the content of the modal, display a message for example) |\n\n## Methods\nThese methods are optional, you can use the isOpen property instead   \n\n| Prop  | Params  | Description |\n| :------------ |:---------------:| :---------------:|\n| open | - | Open the modal |\n| close | - | Close the modal |\n","funding_links":[],"categories":["Components","JavaScript","组件","Libraries","Others"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxs15%2Freact-native-modalbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxs15%2Freact-native-modalbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxs15%2Freact-native-modalbox/lists"}