Built on top of https://github.com/spurtli/react-konfettikanone
react-text-konfettikanone
is a light-weight and hardware accelerated React package that lets you celebrate with text confetti 🎉🎊
yarn add react-text-konfettikanone
Extend custom styles
Array of Strings
["#F6F0FD", "#E3D0FF", "#9C6ADE", "#50248F", "#230051"]
Array of String: Usable font sizes of the text
String: Font family to use for the confetti particles
String: Text to use for confetti particles
Number
Number
Boolean
Function
import { Konfettikanone } from "react-text-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>
);
}
Licensed under the MIT License, Copyright © 2018 Neele Barthel.
See LICENSE for more information.