Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Article preview with cool animation and dark mode

Azhar 600

@azhar1038

Desktop design screenshot for the Article preview component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


This is my solution for Article Preview Component with dark mode and cool circular expanding reveal animation for share menu in mobile view and fade-in animation in desktop.

The most difficult part for me was to position the share menu in desktop mode. I ended up using properties and calc to calculate its position so that it stays in center even if we add more links later.

Another part is accessibility. I did try to make it accessible but I am not sure if I missed something or overdid something.

For show/hide share menu, I have used data attribute instead of toggling class which is as per cube-css methodology.

For JS, I decided to use query selector instead of id. This allows to add multiple cards without any issue. But I think in real projects using any library like react, it is better to just use states.

Do let me know your thoughts :-)

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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