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

FAQ accordion card

#react
Mehdiā€¢ 990

@siavhnz

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi dear community šŸ‘‹

Image position and smooth toggling was the tricky part of this challenge. Finally, I've solved this challenge by using useRef, useState, and useEffect to achieve smooth animation on the toggling description section. I planned to not use any animation library for this simple toggling

Any tips will be appreciated

šŸ™ šŸ’

Community feedback

Sulemanā€¢ 750

@legion40216

Posted

Bro excellent your coding is simple and elegant. Your Frontend skills are awesome, I love to look at your Html and Css coding... But wasnt React an overkill for this project XD

Marked as helpful

1

Mehdiā€¢ 990

@siavhnz

Posted

@legion40216

Thanks for the motivating comment, I appreciate that

I agree with you, there are a lot of solutions out there like bootstrap for accordion that we can just grab their links and do our challenges in less than an hour or even vanilla javascript does the job in this challenge better than React, but It's all about practicing and familiarizing with all aspect of React. I don't like even using pre-created React components because I want to practice, I want to see how I can do a task with React. For me every component; or even every line of code is important I must do it in the not best but acceptable way :)

Your comment made me happy, Thanks šŸ™ šŸ’

1

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