Premium
React Accordion / FAQ Component
Challenge summary
Build a simple FAQ (accordion) UI in React using component state. Clicking a question should toggle its answer.
What you'll practice
- Each FAQ item has a question (header) and an answer (body).
- In the default mode, only one FAQ item can be open at a time.
- Add a control (e.g. a checkbox) to switch to 'allow multiple open' mode.
- In 'allow multiple open' mode, more than one FAQ item can be open at the same time.
- Initially all FAQ items are closed.
What Premium unlocks
Premium unlocks the runnable workspace, behavioral checks, implementation walkthrough, and edge-case discussion.
Free related practice
Upgrade to FrontendAtlas Premium to unlock this challenge. Already upgraded? Sign in to continue.