@coorpacademy/react-native-confetti-cannon
Version: 
Fork: React Native confetti explosion and fall like iOS does.
35 lines (26 loc) • 1.57 kB
Markdown
<p align="center">
  <img height="400" src="https://github.com/VincentCATILLON/react-native-confetti-cannon/raw/master/.github/demo.gif" alt="React-native-confetti-cannon">
</p>
[](https://circleci.com/gh/VincentCATILLON/react-native-confetti-cannon)
```console
npm install react-native-confetti-cannon
yarn add react-native-confetti-cannon
```
```js
import ConfettiCannon from 'react-native-confetti-cannon';
const MyComponent = () => (
  <ConfettiCannon count={200} origin={{x: -10, y: 0}} />
);
```
| Name           | Type                   | Description                                | Required | Default        |
|----------------|------------------------|--------------------------------------------|----------|----------------|
| count          | number                 | items count to display                     | required |                |
| origin         | {x: number, y: number} | animation position origin                  | required |                |
| explosionSpeed | number                 | explosion duration (ms) from origin to top |          | 350            |
| fallSpeed      | number                 | fall duration (ms) from top to bottom      |          | 3000           |
| fadeOut        | boolean                | make the confettis disappear at the end    |          | false          |
| colors   | Array<string>          | give your own colors to the confettis      |          | default colors |