![CircleCI](https://camo.githubusercontent.com/31144926b6faf7b0178046fc7737d24b31c774f52dabf45855cd65326914fcc5/68747470733a2f2f636972636c6563692e636f6d2f67682f56696e63656e74434154494c4c4f4e2f72656163742d6e61746976652d636f6e66657474692d63616e6e6f6e2e7376673f7374796c653d737667)
npm install react-native-confetti-cannon
# or
yarn add react-native-confetti-cannon
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 |
give your own colors to the confettis |
|
default colors |