I got the inspiration to add a code playground to my site from Josh Comeau site. The code playground is built using sandpack and is a great way to allow users to interact with the code and see the results in real-time.
I did some modifications on my own such as a custom reset button and styling.
I will be using this component to demo small bits of Angular, React, and much more.