Animated FAQ Accordion

Intermediate

Modern FAQ accordion with smooth animations, searchable content, and category filtering, perfect for help centers and support pages.

Live Preview

Code Implementation

HTML
<div class="faq-container">
  <div class="faq-demo">
    <div class="faq-header">
      <h2>Frequently Asked Questions</h2>
      <p>Find answers to common questions</p>
    </div>
    
    <div class="faq-search">
      <input type="text" id="faqSearch" placeholder="Search questions...">
      <span class="search-icon">🔍</span>
    </div>
    
    <div class="faq-categories">
      <button class="category-btn active" data-category="all">All</button>
      <button class="category-btn" data-category="general">General</button>
      <button class="category-btn" data-category="account">Account</button>
      <button class="category-btn" data-category="billing">Billing</button>
      <button class="category-btn" data-category="technical">Technical</button>
    </div>
    
    <div class="faq-accordion" id="faqAccordion">
      <!-- FAQ Item 1 -->
      <div class="faq-item" data-category="general">
        <div class="faq-question" tabindex="0">
          <h3>How do I create an account?</h3>
          <span class="faq-toggle">+</span>
        </div>
        <div class="faq-answer">
          <p>To create an account, click on the "Sign Up" button in the top right corner of our website. Fill in your details and verify your email address. You'll receive a confirmation email once your account is activated.</p>
        </div>
      </div>
      
      <!-- FAQ Item 2 -->
      <div class="faq-item" data-category="account">
        <div class="faq-question" tabindex="0">
          <h3>How can I reset my password?</h3>
          <span class="faq-toggle">+</span>
        </div>
        <div class="faq-answer">
          <p>If you've forgotten your password, click on the "Forgot Password" link on the login page. Enter your email address and we'll send you a password reset link. The link will expire in 24 hours for security reasons.</p>
        </div>
      </div>
      
      <!-- FAQ Item 3 -->
      <div class="faq-item" data-category="billing">
        <div class="faq-question" tabindex="0">
          <h3>What payment methods do you accept?</h3>
          <span class="faq-toggle">+</span>
        </div>
        <div class="faq-answer">
          <p>We accept all major credit cards including Visa, MasterCard, American Express, and Discover. We also support PayPal, Apple Pay, and Google Pay for your convenience. All transactions are secured with 256-bit SSL encryption.</p>
        </div>
      </div>
      
      <!-- FAQ Item 4 -->
      <div class="faq-item" data-category="technical">
        <div class="faq-question" tabindex="0">
          <h3>How do I troubleshoot connection issues?</h3>
          <span class="faq-toggle">+</span>
        </div>
        <div class="faq-answer">
          <p>If you're experiencing connection issues, try these steps: 1) Check your internet connection, 2) Restart your router, 3) Clear your browser cache, 4) Disable browser extensions, 5) Try a different browser. If problems persist, contact our support team.</p>
        </div>
      </div>
      
      <!-- FAQ Item 5 -->
      <div class="faq-item" data-category="general">
        <div class="faq-question" tabindex="0">
          <h3>Can I cancel my subscription anytime?</h3>
          <span class="faq-toggle">+</span>
        </div>
        <div class="faq-answer">
          <p>Yes, you can cancel your subscription at any time with no cancellation fees. Your access will continue until the end of your current billing period. To cancel, go to your account settings and click "Cancel Subscription".</p>
        </div>
      </div>
    </div>
    
    <div class="faq-footer">
      <p>Still have questions? <a href="#" class="contact-link">Contact our support team</a></p>
    </div>
  </div>
</div>

Snippet Features

Responsive Design: Yes
Dark Mode Support: No
Category: interactive
Difficulty Level: Intermediate

Browser Compatibility

🟢
chrome 50+
🟠
firefox 45+
🔵
safari 10+
🟦
edge 15+