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 using ReactJS and Tailwind

@gbtan1991

Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Sorry for not merely completing this challenge. I need help with the following to fully finish this challenge.

  1. I need suggestions for a logic wherein I can only open 1 accordion at a time. When 1 accordion is opened and when I open another accordion it will close the previously opened accordion and then open the newly clicked accordion.

  2. I'm a bit new to tailwind. Can you suggest to me how to make it more animated whenever I open an accordion?

Thank you in advance for the feedback you will give.

Community feedback

P
Dean 480

@Deanogit

Posted

Hi @gbtan1991

Your solution is looking great

One way to implement the logic is to

  • use a function to reset the state of all the accordions when any accordion is clicked.

  • once this is fired off, the current accordion being clicked can be opened.

I hope this helps

Above all, great job on building this solution

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