{"id":3943,"url":"https://github.com/oblador/react-native-lightbox","last_synced_at":"2025-05-14T04:09:28.666Z","repository":{"id":35869562,"uuid":"40154710","full_name":"oblador/react-native-lightbox","owner":"oblador","description":"Images etc in Full Screen Lightbox Popovers for React Native","archived":false,"fork":false,"pushed_at":"2021-11-08T16:18:57.000Z","size":448,"stargazers_count":2812,"open_issues_count":84,"forks_count":499,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-13T19:22:35.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/oblador.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},"funding":{"github":["oblador"]}},"created_at":"2015-08-04T00:33:28.000Z","updated_at":"2025-04-11T16:09:33.000Z","dependencies_parsed_at":"2022-06-28T17:42:24.605Z","dependency_job_id":null,"html_url":"https://github.com/oblador/react-native-lightbox","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oblador%2Freact-native-lightbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oblador%2Freact-native-lightbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oblador%2Freact-native-lightbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oblador%2Freact-native-lightbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oblador","download_url":"https://codeload.github.com/oblador/react-native-lightbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254070107,"owners_count":22009559,"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.062Z","updated_at":"2025-05-14T04:09:23.637Z","avatar_url":"https://github.com/oblador.png","language":"JavaScript","funding_links":["https://github.com/sponsors/oblador"],"categories":["Components","组件","JavaScript","Libraries","Others"],"sub_categories":["UI","图形动画"],"readme":"# react-native-lightbox\n\n## Installation\n\n```\nyarn add react-native-lightbox\n```\n\n## Usage\n\n`navigator` property is optional but recommended on iOS, see next section for `Navigator` configuration.\n\n```js\nimport Lightbox from 'react-native-lightbox';\n\nconst LightboxView ({ navigator }) =\u003e (\n  \u003cLightbox navigator={navigator}\u003e\n    \u003cImage\n      style={{ height: 300 }}\n      source={{ uri: 'http://knittingisawesome.com/wp-content/uploads/2012/12/cat-wearing-a-reindeer-hat1.jpg' }}\n    /\u003e\n  \u003c/Lightbox\u003e\n);\n```\n\n### Navigator setup/Android support\n\nFor android support you must pass a reference to a `Navigator` since it does not yet have the `Modal` component and is not on the official todo list. See the `Example` project for a complete example.\n\n```js\nconst renderScene = (route, navigator) =\u003e {\n  const Component = route.component;\n\n  return (\n    \u003cComponent navigator={navigator} route={route} {...route.passProps} /\u003e\n  );\n};\n\nconst MyApp = () =\u003e (\n  \u003cNavigator\n    ref=\"navigator\"\n    style={{ flex: 1 }}\n    renderScene={renderScene}\n    initialRoute={{\n      component: LightboxView,\n    }}\n  /\u003e\n);\n```\n\n## Properties\n\n| Prop | Type | Description |\n|---|---|---|\n|**`activeProps`**|`object`|Optional set of props applied to the content component when in lightbox mode. Usable for applying custom styles or higher resolution image source.|\n|**`renderHeader(close)`**|`function`|Custom header instead of default with X button|\n|**`renderContent`**|`function`|Custom lightbox content instead of default child content|\n|**`willClose`**|`function`|Triggered before lightbox is closed|\n|**`onClose`**|`function`|Triggered when lightbox is closed|\n|**`onOpen`**|`function`|Triggered when lightbox is opened|\n|**`didOpen`**|`function`|Triggered after lightbox is opened|\n|**`underlayColor`**|`string`|Color of touchable background, defaults to `black`|\n|**`backgroundColor`**|`string`|Color of lightbox background, defaults to `black`|\n|**`swipeToDismiss`**|`bool`|Enables gestures to dismiss the fullscreen mode by swiping up or down, defaults to `true`.|\n|**`springConfig`**|`object`|[`Animated.spring`](https://facebook.github.io/react-native/docs/animations.html) configuration, defaults to `{ tension: 30, friction: 7 }`.|\n\n## Demo\n\n![Demo](https://cloud.githubusercontent.com/assets/378279/9074360/16eac5d6-3b09-11e5-90af-a69980e9f4be.gif)\n\n## Example\n\nCheck full example in the `Example` folder.\n\n## License\n\n[MIT License](http://opensource.org/licenses/mit-license.html). © Joel Arvidsson\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foblador%2Freact-native-lightbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foblador%2Freact-native-lightbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foblador%2Freact-native-lightbox/lists"}