# react-native-odinvt-animated-linear-gradient

> Animated linear gradient as background animation or other. Fork for RN 47+ compatibility

Latest version **2.0.2** (published 2017-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-odinvt-animated-linear-gradient
pnpm add react-native-odinvt-animated-linear-gradient
yarn add react-native-odinvt-animated-linear-gradient
bun add react-native-odinvt-animated-linear-gradient
```

## 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 | 2.0.2 |
| Published | 2017-12-15 |
| First published | 2017-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 237 |
| Author | heineiuo |
| Maintainers | odinvt |
| Keywords | react-native, linear-gradient |

## Links

- npm: https://www.npmjs.com/package/react-native-odinvt-animated-linear-gradient
- Repository: https://github.com/heineiuo/react-native-animated-linear-gradient
- Homepage: https://github.com/heineiuo/react-native-animated-linear-gradient#readme
- Issues: https://github.com/heineiuo/react-native-animated-linear-gradient/issues
- npm.io page: https://npm.io/package/react-native-odinvt-animated-linear-gradient

## Dependencies (3)

- [rgb2hex](https://npm.io/package/rgb2hex.md) ^0.1.0
- [prop-types](https://npm.io/package/prop-types.md) 15.5.10
- [react-native-linear-gradient](https://npm.io/package/react-native-linear-gradient.md) ^2.2.0

## Recent versions

- 2.0.2 (latest) — 2017-12-15
- 2.0.1 — 2017-10-18
- 2.0.0 — 2017-10-18

## README

# react-native-animated-linear-gradient
Animated linear gradient as background animation or other.


## Example

<p align="center">
  <img src="https://github.com/heineiuo/react-native-animated-linear-gradient/raw/master/.github/capture.gif" width=375 height=688>
<br>

## Install

1. install [react-native-linear-gradient](https://github.com/react-native-community/react-native-linear-gradient),  run `npm install react-native-linear-gradient --save` 
2. run `react-native link react-native-linear-gradient`
3. run `npm install react-native-animated-linear-gradient --save`


## Use

```javascript
import React, { Component } from 'react';
import { AppRegistry, Text } from 'react-native';
import AnimatedLinearGradient, {presetColors} from 'react-native-animated-linear-gradient'

class HelloWorldApp extends Component {
  render() {
    return (
      <AnimatedLinearGradient customColors={presetColors.instagram} speed={4000}/>
    );
  }
}

AppRegistry.registerComponent('HelloWorldApp', () => HelloWorldApp);
```

## Props

1. `customColors`
A colors `array`. This package has include some preset colors, default is `presetColors.instagram`:

```javascript
export presetColors = {
  instagram: [
    'rgb(106, 57, 171)',
    'rgb(151, 52, 160)',
    'rgb(197, 57, 92)',
    'rgb(231, 166, 73)',
    'rgb(181, 70, 92)'
  ],
  firefox: [
    'rgb(236, 190, 55)',
    'rgb(215, 110, 51)',
    'rgb(181, 63, 49)',
    'rgb(192, 71, 45)',
  ],
  sunrise: [
    'rgb(92, 160, 186)',
    'rgb(106, 166, 186)',
    'rgb(142, 191, 186)',
    'rgb(172, 211, 186)',
    'rgb(239, 235, 186)',
    'rgb(212, 222, 206)',
    'rgb(187, 216, 200)',
    'rgb(152, 197, 190)',
    'rgb(100, 173, 186)',
  ]
};
```

2. `speed`
The speed of the animation. default is 4000.


## License

MIT

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