# react-native-animated-overlay

> React Native Animated Overlay support IOS & Android.

Latest version **0.0.10** (published 2017-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-animated-overlay
pnpm add react-native-animated-overlay
yarn add react-native-animated-overlay
bun add react-native-animated-overlay
```

## 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.0.10 |
| Published | 2017-06-11 |
| First published | 2016-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jacklam |
| Maintainers | jacklam |
| Keywords | overlay, react overlay, react-native, react-native-animated-overlay, react-native-dialog, react native overlay, animated-overlay, react-component, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-animated-overlay
- Repository: https://github.com/jacklam718/react-native-animated-overlay
- Homepage: https://github.com/jacklam718/react-native-animated-overlay/blob/master/README.md
- Issues: https://github.com/jacklam718/react-native-animated-overlay/issues
- npm.io page: https://npm.io/package/react-native-animated-overlay

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K 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
- [react-native-modal-translucent-axton](https://npm.io/package/react-native-modal-translucent-axton.md) — 4 weekly downloads

## Recent versions

- 0.0.10 (latest) — 2017-06-11
- 0.0.9 — 2017-03-12
- 0.0.8 — 2017-03-12
- 0.0.7 — 2017-03-12
- 0.0.6 — 2017-03-05
- 0.0.5 — 2017-02-20
- 0.0.4 — 2016-10-13
- 0.0.3 — 2016-10-12
- 0.0.2 — 2016-10-12
- 0.0.1 — 2016-10-12

## README

## React Native Animated Overlay
React Native Animated Overlay for iOS & Android.

This component just provide a very basic overlay view for you to build something on top of this component.

[Try it with Exponent](https://exp.host/@jacklam718/animatedoverlay-example)

![Example](https://jacklam718.github.io/react-native-animated-overlay/assets/video/react-native-animated-overlay.gif)

## Installation

`npm install --save react-native-animated-overlay`

## Examples
[Example](https://github.com/jacklam718/react-native-animated-overlay/blob/master/animatedoverlay-example/main.js)

## Usage
```javascript
import Raect, { Component } from 'react';
import AnimatedOverlay from 'react-native-animated-overlay';

class AnimatedOverlayExample extends Component {
  constructor(props) {
    super(props);

    this.state = {
      overlayShow: false,
    };

    this.openOverlay = this.openOverlay.bind(this);
    this.closeOverlay = this.closeOverlay.bind(this);
  }

  openOverlay() {
    this.setState({overlayShow: true});
  }

  closeOverlay() {
    this.setState({overlayShow: false});
  }

  render() {
    return (
      <View style={styles.container}>
        <Button
          text="Open Overlay"
          onPress={this.openOverlay}
        />
        <AnimatedOverlay
          onPress={this.closeOverlay}
          backgroundColor='#000'
          opacity={0.5}
          duration={200}
          overlayShow={this.state.overlayShow}
        />
      </View>
    );
  }
}
```

## Props
### AnimatedOverlay
| Prop | Type | Default | Note |
|---|---|---|---|
| `onPress?` | `Function` | `() => {}` |
| `onAnimationFinished?` | `Function` |  `() => {}` |
| `backgroundColor?` | `String` | `#000` |
| `opacity?` | `Number` | `0.5` |
| `duration?` | `Number` | `200` |
| `overlayShow?` | `Bool` | `false` |
| `pointerEvents?` | `string` | `null` |
| `initValue?` | `number` | `0` |
| `style?` | `any` | `null` |
| `useNativeDriver?` | `boolean` | `false` |
| `children?` | `any` | `null` |

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