This is a solution to the FAQ accordion card challenge on Frontend Mentor.
Users should be able to:
- View the optimal layout for the component depending on their device's screen size
- See hover states for all interactive elements on the page
- Hide/Show the answer to a question when the question is clicked
-
Solution: frontendmentor.io
-
Live Site: netlify.app
-
Preparing workflow (Installing Reactjs, Adding assets, Preparing README.md)
-
Identifying components
- FAQ, FancyImage, List, Item
-
Adding CSS Preflight
-
Creating components
-
Working on mobile design based on
design
folder -
Working on desktop design based on
design
folder -
Working on React functionality for accordion faq
-
Completing README.md
-
Publish on Github.com | netligy.app | frontendmentor.io
- React
- CSS Module - For styles
- Mobile-first workflow
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Grid
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 toggling description section
Reading and using animation libraries in my upcoming solution
Thanks To
Frontendmentor.io - for their Excitement challenges
Perfect Pixel - for such a great extension