# react-native-parallax-background

> ## Installation

Latest version **0.1.2** (published 2018-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-parallax-background
pnpm add react-native-parallax-background
yarn add react-native-parallax-background
bun add react-native-parallax-background
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-03-21 |
| First published | 2018-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Danny Qu |
| Maintainers | danny89 |
| Keywords | react, react-native, react-component, parallax |

## Links

- npm: https://www.npmjs.com/package/react-native-parallax-background
- Repository: https://github.com/danny8903/react-native-parallax-background
- Homepage: https://github.com/danny8903/react-native-parallax-background#readme
- Issues: https://github.com/danny8903/react-native-parallax-background/issues
- npm.io page: https://npm.io/package/react-native-parallax-background

## Dependencies (2)

- [react](https://npm.io/package/react.md) 16.2.0
- [react-native](https://npm.io/package/react-native.md) 0.52.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2018-03-21
- 0.1.0 — 2018-03-21

## README

# react-native-parallax-background

## Installation

```
npm install --save react-native-parallax-background
```

## Demo

![Demo](./demo.gif)

## `ParallaxBackground` Properties
#
| Prop | Description |
|---|---|
|**`uri`**|string of image url |
|**`maxHeight`**|height of the image background. |

```js
import {ParallaxBackground} from 'react-native-parallax-background';

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <ParallaxBackground
          maxHeight={300}
          uri={'http://your_image_url.png'}
          >
          <View>
            <Text> content </Text>  
          </View>  
        </ParallaxBackground>
      </View>
    );
  }
}
```

## `HorizontalWrapper` Properties
*Note: `ParallaxBackground` elements must be direct descendants of `HorizontalWrapper`*

| Prop | Description | Defaul|
|---|---|---|
|**`offset`**|index of the children ParallaxBackground component to be showed.|0|

```js
import {HorizontalWrapper, ParallaxBackground} from 'react-native-parallax-background';

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <HorizontalWrapper
        offset={1}>
          <ParallaxBackground
            maxHeight={300}
            uri={'http://your_image_url.jpg'}>
            <View><Text> Content 1</Text> </View>  
          </ParallaxBackground>
          <ParallaxBackground
            maxHeight={300}
            uri={'http://your_image_url.jpg'}>
            <View><Text> Content 2</Text> </View>  
          </ParallaxBackground>
          <ParallaxBackground
            maxHeight={300}
            uri={'http://your_image_url.jpg'}>
            <View><Text> Content 3</Text> </View>  
          </ParallaxBackground>
        </HorizontalWrapper>
      </View>
    );
  }
}
```

## References and Credits
- [f8app](https://github.com/fbsamples/f8app) from Facebook Samples
- [react-native-parallax-view](https://github.com/lelandrichardson/react-native-parallax-view) by Leland Richardson

## License

[MIT License](http://opensource.org/licenses/mit-license.html).

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