Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

FAQ accordion

animation
sherimin•420
@sherimin
A solution to the FAQ accordion challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I managed to add some transitional effects for the expansion and collapse for the answer cards.

What specific areas of your project would you like help with?

One thing I am not too sure is if I need to further make my code "DRY". I feel like for now I am applying the same logic and almost identical codes to all the answer cards, and the only difference is the sequence number of each question and answer. (I think of moving the question and answer to their own data file, and creating a for loop to display them, but I don't know if that's the ideal approach?)

Any input would be appreciated!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on sherimin's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License