# react-native-imagebox

> huhuge

Latest version **1.1.7** (published 2018-01-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-imagebox
pnpm add react-native-imagebox
yarn add react-native-imagebox
bun add react-native-imagebox
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2018-01-17 |
| First published | 2018-01-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | huhuge |
| Maintainers | huhuge |
| Keywords | react-native, lightbox, image-lightbox, react-native-imagebox |

## Links

- npm: https://www.npmjs.com/package/react-native-imagebox
- npm.io page: https://npm.io/package/react-native-imagebox

## Dependencies (3)

- [react-native-fs](https://npm.io/package/react-native-fs.md) ^2.9.7
- [react-native-swiper](https://npm.io/package/react-native-swiper.md) ^1.5.13
- [react-native-image-pan-zoom](https://npm.io/package/react-native-image-pan-zoom.md) ^2.0.16

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [post-robot](https://npm.io/package/post-robot.md) — 93.7K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads

## Recent versions

- 1.1.7 (latest) — 2018-01-17
- 1.1.6 — 2018-01-17
- 1.1.5 — 2018-01-17
- 1.1.4 — 2018-01-17
- 1.1.3 — 2018-01-17
- 1.1.2 — 2018-01-12
- 1.1.1 — 2018-01-12
- 1.1.0 — 2018-01-12
- 1.0.9 — 2018-01-12
- 1.0.8 — 2018-01-12

## README

# react-native-lightbox

## Installation

```
yarn add react-native-imagebox

or  npm install react-native-imagebox
```

## Usage

Save the image to the local ios rely on CameraRoll android at the same time rely on CameraRoll and react - native - fs

```js
import ImageBox from "react-native-imagebox";

    ​//数组中图片的个数决定弹出轮播图的的图片个数
    
    let images = [
      "http://otn4d80hz.bkt.clouddn.com/98210784.jpg",
      "http://otn4d80hz.bkt.clouddn.com/WechatIMG11.jpeg"
    ]

    // 用于 item 中图片的显示
      <View style={styles.moreImage}>
            <ImageBox
                imageStyle = {{height:200,width:200}}
                underlayColor = "#fff"
                showIndex = {0}      
                images = {images}
                imagesource = {images[0]}>
            </ImageBox>
      </View>
);

moreImage:{
    width:myUtil.size.width,
    flexDirection: 'row',
    flexWrap:'wrap'
},

moreImageView:{
    height:myUtil.size.width/3,
    width:myUtil.size.width/3
}

```

## 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|
|**`onClose`**|`function`|Triggered when lightbox is closed|
|**`onOpen`**|`function`|Triggered when 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`](https://facebook.github.io/react-native/docs/animations.html) configuration, defaults to `{ tension: 30, friction: 7 }`.|

## GifImage

![Image](http://otn4d80hz.bkt.clouddn.com/imagebox.gif)

---
_Source: https://npm.io/package/react-native-imagebox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
