oblador/react-native-lightbox
oblador/react-native-lightbox has 2,804 GitHub stars and 481 forks. GitHot measured -1 stars in 24 hours and -1 in 7 days. Last checked 2026-11-12 13:48 UTC. Last push 2021-11-08.
Images etc in Full Screen Lightbox Popovers for React Native
Crecimiento de estrellas medido
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- Actualización retrasada
- in 1 month
- Actualización retrasada
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Originalreact-native-lightbox
Installation
yarn add react-native-lightbox
Usage
navigator property is optional but recommended on iOS, see next section for Navigator configuration.
import Lightbox from 'react-native-lightbox';
const LightboxView ({ navigator }) => (
<Lightbox navigator={navigator}>
<Image
style={{ height: 300 }}
source={{ uri: 'http://knittingisawesome.com/wp-content/uploads/2012/12/cat-wearing-a-reindeer-hat1.jpg' }}
/>
</Lightbox>
);
Navigator setup/Android support
For 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.
const renderScene = (route, navigator) => {
const Component = route.component;
return (
<Component navigator={navigator} route={route} {...route.passProps} />
);
};
const MyApp = () => (
<Navigator
ref="navigator"
style={{ flex: 1 }}
renderScene={renderScene}
initialRoute={{
component: LightboxView,
}}
/>
);
Properties
| Prop | Type | Description |
|---|---|---|
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. |
renderHeader(close) |
function |
Custom header instead of default with X button |
renderContent |
function |
Custom lightbox content instead of default child content |
willClose |
function |
Triggered before lightbox is closed |
onClose |
function |
Triggered when lightbox is closed |
onOpen |
function |
Triggered when lightbox is opened |
didOpen |
function |
Triggered after lightbox is opened |
underlayColor |
string |
Color of touchable background, defaults to black |
backgroundColor |
string |
Color of lightbox background, defaults to black |
swipeToDismiss |
bool |
Enables gestures to dismiss the fullscreen mode by swiping up or down, defaults to true. |
springConfig |
object |
Animated.spring configuration, defaults to { tension: 30, friction: 7 }. |
Demo

Example
Check full example in the Example folder.
License
MIT License. © Joel Arvidsson
Explorar proyectos relacionados
freeCodeCamp/freeCodeCamp
Base de código abierto y plan de estudios de freeCodeCamp.org. Aprende matemáticas, programación y ciencias de la computación gratis.
459,070 estrellasdonnemartin/system-design-primer
Aprende a diseñar sistemas a gran escala y prepárate para la entrevista de diseño de sistemas. Incluye fichas de Anki.
377,741 estrellasreact/react
La biblioteca para interfaces de usuario web y nativas.
252,571 estrellasvuejs/vue
Este es el repositorio de Vue 2. Para Vue 3, visita https://github.com/vuejs/core
212,527 estrellas