# react-native-animated-form

> Animated form for both Android and iOS

Latest version **0.0.7** (published 2018-03-19) · MIT license · 0 weekly downloads

## Install

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

## 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.7 |
| Published | 2018-03-19 |
| First published | 2018-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 967.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | aaron_ta |
| Maintainers | aaron_ta |
| Keywords | react, react, native, animated, form |

## Links

- npm: https://www.npmjs.com/package/react-native-animated-form
- Repository: https://github.com/maphongba008/react-native-animated-form
- Homepage: https://github.com/maphongba008/react-native-animated-form#readme
- Issues: https://github.com/maphongba008/react-native-animated-form/issues
- npm.io page: https://npm.io/package/react-native-animated-form

## Dependencies (1)

- [prop-types](https://npm.io/package/prop-types.md) ^15.5.9

## 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.0.7 (latest) — 2018-03-19
- 0.0.6 — 2018-03-19
- 0.0.5 — 2018-03-19
- 0.0.4 — 2018-03-19
- 0.0.3 — 2018-03-19

## README

# react-native-animated-form
Animated form for both Android and iOS


## Installation

```bash
npm install --save react-native-animated-form
```

## Demo
![](https://raw.githubusercontent.com/maphongba008/react-native-animated-form/master/anim.gif)

## Usage

```javascript
import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Animated,
    TextInput,
    TouchableOpacity,
    Image
} from 'react-native';

import AnimatedForm from 'react-native-animated-form';
import Background from './bg.jpg';

const AnimatedInput = Animated.createAnimatedComponent(TextInput);
export default class App extends Component {
    render() {
        return (
            <View style={styles.container}>
                <Image style={[StyleSheet.absoluteFill, {width: null, height: null}]} source={Background} />
                <AnimatedForm delay={100} distance={5}>
                    <AnimatedInput placeholder='User name' underlineColorAndroid='transparent' style={styles.text} />
                    <AnimatedInput placeholder='Email' underlineColorAndroid='transparent' style={styles.text} />
                    <AnimatedInput placeholder='Password' underlineColorAndroid='transparent' style={styles.text} />
                    <AnimatedInput placeholder='Confirm password' underlineColorAndroid='transparent' style={styles.text} />

                    <Animated.View style={styles.buttonView}>
                        <TouchableOpacity style={styles.button}>
                            <Text style={{color: '#fff'}}>Register</Text>
                        </TouchableOpacity>
                    </Animated.View>
                </AnimatedForm>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#919191',
    },
    text: {
        width: 250,
        height: 35,
        paddingHorizontal: 10,
        marginVertical: 5,
        borderWidth: 1,
        borderRadius: 5,
        borderColor: "#FFF",
        color: "#333",
        backgroundColor: "#FFF",
      },
      buttonView: {
        height: 40,
        marginTop: 10,
        backgroundColor: "tomato",
        paddingVertical: 10,
        paddingHorizontal: 5,
        borderRadius: 5,
      },
      button: {
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center'
      }
});

```

## Properties

 name                  | description                                 | type     | default
:--------------------- |:------------------------------------------- | --------:|:------------------
 delay (ms)            | The delay between components in form        |   Number | 100
 distance              | The distance that component will move       |   Number | 5

## Warning
All component in AnimatedForm must be animated.

## Copyright and License

MIT License

Copyright (c) 2018 maphongba008

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