Skip to content

FAQ with contact card in React

Frequently asked questions followed by a card inviting visitors to call or write.

Here is an excerpt of this component's code in React. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in React

FaqWithContact.tsx
export function FaqWithContact() {
  return (
    <div className="mx-auto w-[min(100%_-_2rem,46rem)] py-8">
      <section>
        <h2 className="mb-4 text-3xl font-bold">Questions fréquentes</h2>
        <details className="group border-b border-[#cfdcec] dark:border-[#1f3550]">
          <summary className="cursor-pointer list-none py-4 font-semibold before:inline-block before:w-5 before:font-extrabold before:transition-transform before:content-['›'] group-open:before:rotate-90 focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-sky-700 motion-reduce:before:transition-none dark:focus-visible:outline-sky-300 [&::-webkit-details-marker]:hidden">
            Intervenez-vous le week-end ?
          </summary>
          <p className="pb-4 pl-5 leading-relaxed text-[#3d5574] dark:text-[#b5c9de]">
            Oui, pour les urgences (fuite, panne de chauffage), nous intervenons le samedi et le
            dimanche avec une majoration de 30 % annoncée avant le déplacement.

Free component: copy it freely, including for commercial projects.

FAQ and accordions components in React
  • A native accordion FAQ where each answer asks “Was this answer helpful?”, with a thank-you message and a remembered vote.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • An introduction and a contact link on the left, expandable questions on the right.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A tight accordion within a single frame, for practical information pages.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Questions grouped under subheadings, for long FAQs.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • All answers visible at once, presented as a card grid.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Questions that expand one by one, with FAQPage structured data for Google.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component