react-konfettikanone

Hooray – celebration everywhere!

Usage no npm install needed!

<script type="module">
  import reactKonfettikanone from 'https://cdn.skypack.dev/react-konfettikanone';
</script>

README

react-konfettikanone
Travis CI

react-konfettikanone is a light-weight and hardware accelerated React package that lets you celebrate with confetti 🎉🎊

✨ What it looks like

react-konfettikanone


🚀 Setup

yarn add react-konfettikanone

👩🏼‍💻 How to use <Konfettikanone />

className

Extend custom styles

colors

Array of Strings ["#F6F0FD", "#E3D0FF", "#9C6ADE", "#50248F", "#230051"]

particles

Number

duration

Number

launch

Boolean

onLaunchEnd

Function


👷🏼‍♀️ Example

import { Konfettikanone } from "react-konfettikanone";
function CelebrationCard() {
  return (
    <Konfettikanone launch={this.state.launch}>
      <div>
        <h2>🎊 Hooray, hooray! 🎊</h2>
        <p>Let's celebrate and throw some confetti!</p>
      </div>
      <button type="button" onClick={() => this.setLaunched(true)}>
        Confetti!
      </button>
    </Konfettikanone>
  );
}

🎫 License

Licensed under the MIT License, Copyright © 2018 Neele Barthel.
See LICENSE for more information.