Premium

React Accordion / FAQ Component

By FrontendAtlas Editorial · Updated Jan 30, 2026

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. It also runs as an Interview Pressure Mode, in rounds that add requirements the way an interviewer does.

Free related practice

Public interview reports: LeetCode Discuss (July 2020), LeetCode Discuss (November 2022) · Amazon frontend interview questions · Walmart frontend interview questions

Upgrade to FrontendAtlas Premium to unlock this challenge. Already upgraded? Sign in to continue.

Premium is $24 a month or $99 a year, less in many countries.