
Design comparison
Solution retrospective
The share menu appears immediately because I'm using display: none; I would love if someone suggest a way to make it appear smoothly
Community feedback
- @khatri2002Posted 3 months ago
Hi! The developed solution looks great, and the component is effectively meeting the requirements for both desktop and mobile resolutions!
Suggestion for a Smooth Transition:
To ensure a smooth transition when showing the social share icons box, avoid toggling its
display
property. While usingdisplay: none;
ordisplay: block;
works, it does not support transitions or animations, leading to a stiff appearance.Instead, follow this approach:
-
Initial State (Hidden)
- Set the box’s initial state using:
opacity: 0; visibility: hidden;
- This ensures the box is visually hidden and inaccessible.
- Set the box’s initial state using:
-
Visible State (On Interaction)
- When showing the box, change its properties to:
opacity: 1; visibility: visible;
- When showing the box, change its properties to:
-
Add Transition
- To achieve the smooth transition effect, add:
transition: opacity 0.3s ease, visibility 0.3s ease;
- This ensures the change in opacity and visibility occurs smoothly over time.
- To achieve the smooth transition effect, add:
-
Optional Enhancement
- To make the animation even more dynamic, consider adding:
transform: translateY(10px); /* Initial state */
- Combine this with:
transform: translateY(0); /* Final state */ transition: transform 0.3s ease;
- This creates an effect where the box appears to slide up from the bottom.
- Combine this with:
- To make the animation even more dynamic, consider adding:
Keep experimenting with this approach to perfect the animation and achieve the desired visual effect. These little touches can make a big difference in enhancing the user experience!
Great job so far! Keep up the amazing work! 🚀
0 -
- @alexpeteronojaPosted 3 months ago
Nice Work
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord