# @fabfit/react-native-parallax-header

> Animated parallax headers for React Native

Latest version **0.4.0** (published 2020-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fabfit/react-native-parallax-header
pnpm add @fabfit/react-native-parallax-header
yarn add @fabfit/react-native-parallax-header
bun add @fabfit/react-native-parallax-header
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2020-04-12 |
| First published | 2020-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 74.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jamie Halvorson |
| Maintainers | jamiehalvorson |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/@fabfit/react-native-parallax-header
- Repository: https://github.com/FabFit/react-native-parallax-header
- Homepage: https://github.com/FabFit/react-native-parallax-header#readme
- Issues: https://github.com/FabFit/react-native-parallax-header/issues
- npm.io page: https://npm.io/package/@fabfit/react-native-parallax-header

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2020-04-12
- 0.3.0 — 2020-04-05
- 0.2.0 — 2020-04-05
- 0.1.0 — 2020-04-05

## README

<div align="center">
<h1>React Native Parallax Header</h1>
<img style="padding-right: 10px" src="https://img.shields.io/npm/v/@fabfit/react-native-parallax-header?style=flat-square" />
<img src="https://img.shields.io/bundlephobia/min/@fabfit/react-native-parallax-header?style=flat-square" />

Animated parallax headers for React Native as seen in our FabFit Studio App.

</div>

---

This component currently only supports **iOS**. It has not been tested in a production environment on Android.

| Basic example (`examples/src/screens/image`)                                                                      | Overlay example (FabFit Studio iOS App)                                                                            |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| <img src="https://fabfit-github.now.sh/parallax/parallax-one-optim.gif" width="250px" style="max-width: 250px" /> | <img src="https://fabfit-github.now.sh/parallax/parallax-two-optim.gif" width="250px" style="max-width: 250px"  /> |

## Installation

```sh
npm install @fabfit/react-native-parallax-header
```

or

```sh
yard add @fabfit/react-native-parallax-header
```

## Usage

```tsx
import ParallaxHeader from '@fabfit/react-native-parallax-header';

const MyScreen = () => (
  <ParallaxHeader
    maxHeight={300}
    minHeight={100}
    heroImage={{ uri: 'https://source.unsplash.com/user/erondu/600x300' }}
  >
    <Text>All children will render below the parallax header</Text>
  </ParallaxHeader>
);
```

## Props

| Name                 | Description                                           | Default |
| -------------------- | ----------------------------------------------------- | ------- |
| maxHeight (optional) | Sets the maximum height of the header                 | 550     |
| minHeight (optional) | Sets the minimum height of the header                 | 170     |
| children             | React children                                        | -       |
| renderOverlay        | Renders an overlay over the parallax header, e.g text | -       |
| renderHeader         |                                                       | -       |
| heroImage            | React Native image props for display default image    | -       |

## Examples

There are a number of examples that can be found in the `/examples` directory. If you'd like to run the examples you will need to:

1. checkout this repository
2. run `yarn ; yarn bootstrap` in the root
3. run `yarn example:ios` which will run the example directory in a simulator

## License

[MIT](https://choosealicense.com/licenses/mit/) © [FabFit](https://fab.fitness)

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