DEV Community

Cover image for Hover Button Smiley 🙂 | Hide and Reveal
Takane Ichinose
Takane Ichinose

Posted on

Hover Button Smiley 🙂 | Hide and Reveal

CodePenChallenge Microinteractions Hide and Reveal

Description

This is just a simple interaction, when the user hovered on the button, the smiley icon will show.

The face of the smiley icon will follow the mouse pointer relative to the button's position.

I used "Single Page Vue Component" to render the element, styles, as well as the functionalities of the button.

I made the style of the button a little bit "glossy" by adding a dark-colored inset box-shadow, and also the white thing at the top left of the button. I created it by drawing an ellipse, then blurred it out by using filter.

Note

While smartphone devices doesn't have "hover" or "mouseover" event by default, the effect may still be seen by using the "touch" event on the button.

Resources

Javascript framework: VueJS

Fonts: Fredoka One

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

Best practices for optimal infrastructure performance with Magento

Running a Magento store? Struggling with performance bottlenecks? Join us and get actionable insights and real-world strategies to keep your store fast and reliable.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️