Frontend Mentor
by Alex Roan on 9 Jun 2025
This is the first Frontend Mentor challenge in their JavaScript path.
The JavaScript in this exercise is fairly simple. You use an event listener to watch for a click on the share icon. You then show a pop up menu with links for a few social media platforms.
The main challenge with this design was the different pop up behaviour for narrow and wide screens. For wide screens, such as desktops, it's simply a pop-up next to the share button. For mobiles it's a banner across the bottom of the component.
Here is the desktop design:
The page is live on github.
Share on LinkedIn, X, or Facebook.