Applause useSound Confetti

Applause Button
Click the flowers π for claps in the Bio Section above and see an hear the Magic. π€π
I wanted a Applause button with sound and Confetti of my own design and below is what I came up with. I will be adding a version for FaunaDB using my own API with Netlify functionsπ―
Applause api
π§ Utilizing the free api from π Applause Button to CRUD the data. If you use this API allot, you should donate for its server time or to π Open Collective.
useSound
A React Hook for Sound Effects
π Repo π useSound by Josh W Comeau
The web needs more (tasteful) sounds!
- π Lets your website communicate using 2 human senses instead of 1
- π₯ Declarative Hooks API
- β‘οΈ <1kb bytes (gzip) in your bundle! ~10kb loaded async.
- β¨ Built with Typescript
- π£ Uses a powerful, battle-tested audio utility: Howler.js
This library only works with React DOM, but @remigallego created an alternative for React Native! Check out react-native-use-sound.
Confetti Cannon
π£ I am using π react-dom-confetti for the Confetti Cannon that is positioned over the Applause button as so the explosion will come from the button count on the API response.
Install Modules
π€ You will have to add sound.mp3 and modules. I got my clapping.mp3 from π FreeSound.org
Your own clapping sound
And then installβ¦
If you are using the below code give a Applause or use any social link or github star or add a Comment in the FaunaDB Comments Form to display your comments on this page.
Applause Code
Copy Code Button
You can see confetti and hear the applause by clicking the copy icon in any codeblock.