DEV Community

Cover image for Adding Sound to a React Project

Adding Sound to a React Project

David Guzman on March 07, 2021

Adding Sounds to a react project is fairly simple. In this blog, I'll demonstrate how you can implement sound to your react project! Prer...
Collapse
 
nivethan profile image
Nivethan Ariyaratnam • Edited

i like the way that props are showing in cursive, how to do that in vs code? is it a font? or a theme?

Collapse
 
daveguz97 profile image
David Guzman

Sorry for the late reply, haven't blogged in a while, it's a font called Fira Code Iscript.

Collapse
 
matekomenda profile image
Komenda Máté

What is this VS Code theme, can u tell me ? :)

Collapse
 
daveguz97 profile image
David Guzman

I think I used outrun electric

Collapse
 
ajaychandraofficial profile image
Ajay Chandra

The theme name is Shades of Purple I think

Collapse
 
strk14_ profile image
Aman Shukla

Theme is more eye grasping 😍

Collapse
 
clefayomide profile image
clefayomide

Nice article. Would love to use it in my portfolio project. Is there a prop to pass in a default volume ?

Collapse
 
clefayomide profile image
clefayomide

i just went through the official doc and its packed with tons of useful props including the volume i was asking for. thanks for sharing!

Collapse
 
daveguz97 profile image
David Guzman

No problem, I don't think there's a prop for the default volume, but let me know!

Collapse
 
hagureantra profile image
Antra Hagure

Thank you for this article, it very helpful!

I have a question: how do you make a sound prop for button so each button you create could have a different sound effect?

I have been stuck on this for a while.

Collapse
 
jameshubert_com profile image
James Hubert

Awesome. Such a fun feature. Glad someone wrote about this.

Collapse
 
daveguz97 profile image
David Guzman

Thanks for the comment! Interesting feature and easy to implement!