You can then require('canvas-confetti'); to use it in your project build. Note: this is a client component, and will not run in Node. You will need to

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-04-25 12:00:03

You can then require('canvas-confetti'); to use it in your project build. Note: this is a client component, and will not run in Node. You will need to build your project with something like webpack in order to use this.

Note: you should use the latest version at the time that you include your project. You can see all versions on the releases page.

Thank you for joining me in this very important message about motion on your website. See, not everyone likes it, and some actually prefer no motion. They have ways to tell us about it and we should listen. While I don't want to go as far as tell you not to have confetti on your page just yet, I do want to make it easy for you to respect what your users want. There is a disableForReducedMotion option you can use so that users that have trouble with chaotic animations don't need to struggle on your website. This is disabled by default, but I am considering changing that in a future major release. If you have strong feelings about this, please let me know. For now, please confetti responsibly.

When installed from npm, this library can be required as a client component in your project build. When using the CDN version, it is exposed as a confetti function on window.

Leave a Comment