FT
FAQ Templates

ASSET_SPEC // SEARCHABLE_FAQ

Searchable FAQFAQ template

A powerful FAQ interface with a real-time search filter to help users find answers instantly.

Live_Preview_Environment

How can we help?

4 results

Is there a free trial?

Trial availability is listed on the current pricing page.

How do I cancel my subscription?

Cancellation options and effective dates are shown in account settings.

Can I change plans mid-cycle?

Available plan changes and their effective dates are shown in billing settings.

Do you offer team discounts?

Current team pricing and eligibility are listed on the pricing page.

When_to_Use

Use the searchable FAQ when your collection is large enough that scrolling becomes painful. Live filtering paired with a polite live region keeps the experience accessible as the result count updates.

Source_Manifest

Source_Inspector // TAILWIND
<section class="mx-auto max-w-4xl px-4 py-12" data-searchable-faq>
  <div class="mb-10">
    <h2 class="text-3xl font-bold text-gray-900">How can we help?</h2>
    <div class="mt-6 relative">
      <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
        <svg aria-hidden="true" class="h-5 w-5 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
        </svg>
      </div>
      <label class="sr-only" for="faq-search">Search frequently asked questions</label>
      <input
        id="faq-search"
        type="search"
        placeholder="Search for answers..."
        data-faq-search
        class="block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-lg leading-5 bg-white placeholder-gray-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500 sm:text-sm transition duration-150 ease-in-out"
      />
    </div>
    <p class="sr-only" aria-live="polite" data-faq-status>1 result</p>
  </div>

  <div class="space-y-6" data-faq-results>
    <article class="bg-white p-6 rounded-xl border border-gray-100 shadow-sm hover:shadow-md transition-shadow" data-faq-item>
      <h3 class="text-lg font-semibold text-gray-900">How to use search?</h3>
      <p class="mt-3 text-gray-600">Just start typing keywords to filter the list of questions instantly.</p>
    </article>
    <article class="bg-white p-6 rounded-xl border border-gray-100 shadow-sm hover:shadow-md transition-shadow" data-faq-item>
      <h3 class="text-lg font-semibold text-gray-900">Is it real-time?</h3>
      <p class="mt-3 text-gray-600">Yes, the results update immediately as you type in the search bar.</p>
    </article>
  </div>
</section>

<script>
  const root = document.querySelector('[data-searchable-faq]');
  const input = root.querySelector('[data-faq-search]');
  const items = [...root.querySelectorAll('[data-faq-item]')];
  const status = root.querySelector('[data-faq-status]');

  input.addEventListener('input', () => {
    const query = input.value.trim().toLowerCase();
    let visibleCount = 0;

    items.forEach((item) => {
      const matches = item.textContent.toLowerCase().includes(query);
      item.hidden = !matches;
      visibleCount += Number(matches);
    });

    status.textContent = `${visibleCount} ${visibleCount === 1 ? 'result' : 'results'}`;
  });
</script>
READ_ONLY