Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

📂 Accordion

An elegant and accessible FAQ accordion built with React.js, JavaScript, and TailwindCSS. This component allows users to expand and collapse questions interactively, with an optional single-open mode for streamlined UX.

🎯 Challenge Overview

🕒 Estimated Completion Time: 30–40 minutes

🛠️ Task Overview:

Create a responsive accordion interface for FAQs or content sections. Users should be able to toggle questions open/closed, with an optional mode that restricts to one open item at a time.

📌 Requirements:

  • FAQ Items: Each question expands to reveal its answer.
  • 🔄 Toggle Mode: Enable/disable single-open mode via checkbox or switch.
  • 📐 Responsive Layout: Works seamlessly across screen sizes.
  • ⚛️ State Management: Use React hooks to manage open/closed states.
  • 🎨 Styling: Dark-themed, modern design using TailwindCSS.

🔍 Development Focus:

  • Component Modularity → Reusable AccordionItem and AccordionContainer components.
  • UX Clarity → Smooth transitions, clear indicators of open/closed state.
  • Accessibility → Keyboard navigation, ARIA roles, and semantic HTML.
  • Performance → Efficient rendering and state updates.

🌟 Additional Considerations:

  • Add animation for expand/collapse transitions.
  • Support deep linking or auto-expanding based on URL hash.
  • Consider integrating markdown or rich text support for answers.