# react-native-confetti

> Raining confetti made with react native animations

Latest version **0.1.0** (published 2018-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-confetti
pnpm add react-native-confetti
yarn add react-native-confetti
bun add react-native-confetti
```

## Health

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

Positive: has types package; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-09-06 |
| First published | 2016-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/react-native-confetti) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 220 |
| Author | Codeventure |
| Maintainers | codeventure |
| Keywords | react-native, ios, android, confetti, animation |

## Links

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

## 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.1.0 (latest) — 2018-09-06
- 0.0.6 — 2017-06-29
- 0.0.5 — 2017-06-16
- 0.0.4 — 2016-08-01
- 0.0.3 — 2016-07-31
- 0.0.2 — 2016-07-31
- 0.0.1 — 2016-07-29

## README

# react-native-confetti
Raining confetti made with react native animations

<p align="left">
  <img src="./demo.gif" width="320" height="282">
</p>

## Installation

```sh
npm i -S react-native-confetti
```

## Usage

```javascript
import React, {Component} from 'react';
import {
  AppRegistry,
  StyleSheet,
  View
} from 'react-native';

import Confetti from 'react-native-confetti';

class RNConfetti extends Component {
  componentDidMount() {
    if(this._confettiView) {
       this._confettiView.startConfetti();
    }
  }

  componentWillUnmount ()
  {
      if (this._confettiView)
      {
          this._confettiView.stopConfetti();
      }
  }

  render() {
    return <View style={styles.container}>
      <Confetti ref={(node) => this._confettiView = node}/>
    </View>
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1
  }
});
```

## Props

Property         | Type     | Default  | Description
---              | ---      | ---      | ---
`confettiCount`  | `Number` |  100     | Number of confetti
`timeout`        | `Number` |  30 (ms)     | Timeout between confetti
`untilStopped`   | `Boolean` | false | Render confetti continuously until `stopConfetti()` is called. This ignores `confettiCount`.
`duration`       | `Number` |  6000 (ms) | Duration until a conffetti reaches the bottom
`colors`       | `Array` |  ["rgb(242.2, 102, 68.8)","rgb(255, 198.9, 91.8)","rgb(122.4, 198.9, 163.2)","rgb(76.5, 193.8, 216.7)","rgb(147.9, 99.4, 140.2)"] | Array of color strings to choose from for the confetti
`size`           | `Number` |   1       | Multiplier for size of confetti (width and heigh)
`bsize`           | `Number` |   1       | Multiplier for radius of confetti (border radius)

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