Package Exports
- react-confetti
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-confetti) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-confetti
Confetti without the cleanup.
Based on a pen by @Gthibaud: http://codepen.io/Gthibaud/pen/BoaBZK
Install
npm i -S react-confetti
Use
import Confetti from 'react-confetti'
import React from 'react'
export default class MyComponent extends React.Component {
render() {
return (
<div>
<h1>My Component contents</h1>
<Confetti />
</div>
)
}
}
Props
Property | Type | Default | Description |
---|---|---|---|
width |
Number or String |
'100%' |
Width of the <canvas> element. |
height |
Number or String |
'100%' |
Height of the <canvas> element. |
numberOfPieces |
Number |
200 | Number of confetti pieces at one time. |
friction |
Number |
0.99 | |
wind |
Number |
0 | |
gravity |
Number |
0.1 |