1.0.1 • Published 3 years ago

react-raining-confetti v1.0.1

Weekly downloads
4
License
ISC
Repository
-
Last release
3 years ago

react-raining-confetti

react-raining-confetti is a react base component that add raining confetti to your application using canvas. with zero dependencies.

codesandbox demo -> Demo

Installation

Use the package manager npm to install .

npm i react-raining-confetti 

Usage

import React from "react";
import { ConfettiCanvas } from "react-raining-confetti";

export default function App() {
  return (
    <div className="App">
        <h1 style={{ top: '50%', left: "50%", position: 'absolute' }}> It's confetti time!!! </h1>
        <ConfettiCanvas active={true} fadingMode="LIGHT" stopAfterMs={5000} />
    </div>
  );
}
propstypedefault valueinfo
activebooleantrueUse to confetti start/stop falling
fading'OFF', 'LIGHT', 'DARK''OFF'Fading confetti color
stopAfterMsnumber0Time in ms to auto stop the confetti, should be larger than 1000 to cool effect and 0 to disabled autostop.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

1.0.1

3 years ago

1.0.0

3 years ago