All-Access · 23 templates$1319.97$99/year — save 92%Get access
  • HomeHome
  • TemplatesTemplates17+
  • ComponentsComponents80+
  • PricingPricing
  • Need a Website?Need a Website?New
Unlock All AccessUnlock All Access

Our latest template collection

Ready-to-launch sites for real estate agents, service businesses, and local brands — built to rank, load fast, and convert.

Explore All TemplatesExplore All Templates

Orvaine - Luxury Equestrian & Horse Breeding Website Template

Orvaine is a premium website template for stud farms, sport horse breeders and equestrian estates: horse pages with pedigrees, events, films. Next.js, Astro, Sanity.

Download Template
Orvaine - Luxury Equestrian & Horse Breeding Website Template

Maressa - Luxury Yacht Charter & Sales Website Template

Maressa is a premium website template for yacht charter, brokerage and superyacht brands: 21 editable sections, full-screen films, Next.js and Astro versions. Sanity.

Download Template
Maressa - Luxury Yacht Charter & Sales Website Template

Krishi – Agriculture & Farm Website Template

Krishi is a premium website template for farms, agritech and food brands: 17 editable sections, cinematic GSAP motion and both Next.js and Astro versions. Built with Sanity.

Download Template
Krishi – Agriculture & Farm Website Template
ComponentsAccordionsAccordion FAQs
FreeReactTailwind CSSNext.js

Accordion FAQs

An FAQ accordion that opens one answer at a time with a smooth CSS grid height animation. React and Tailwind CSS, no dependencies.

View codeView code
Full screen
AccordionFAQs.tsx
"use client";

// FAQ accordion: one answer open at a time, smooth height animation via CSS grid rows.
// Pure Tailwind + React, no dependencies. Works with Tailwind v3 and v4.

import { useState } from "react";

type Faq = { question: string; answer: string };

type Props = {
  heading?: string;
  faqs?: Faq[];
};

const DEFAULT_FAQS: Faq[] = [
  { question: "How do I search for properties on your website?", answer: "Use the search bar to filter by location, price range, property type and more, then browse the listings that match. Save a search to get new matches by email." },
  { question: "Are the listings updated regularly?", answer: "Yes. Listings sync with our agents' systems throughout the day, so what you see is what's available." },
  { question: "Can I book viewings directly through the website?", answer: "Absolutely. Every listing has a 'Book a viewing' button that shows the agent's available times." },
  { question: "Do you help with financing and mortgages?", answer: "We work with trusted lenders and can introduce you to a mortgage adviser who will walk you through your options." },
  { question: "What types of properties do you specialise in?", answer: "Family homes, apartments and new builds across the city and surrounding suburbs, for both sale and rent." },
];

export default function AccordionFaqs({ heading = "Frequently asked questions", faqs = DEFAULT_FAQS }: Props) {
  const [openIndex, setOpenIndex] = useState<number | null>(0);

  return (
    <section className="bg-white px-5 py-20 font-['Manrope',ui-sans-serif,system-ui,sans-serif] antialiased md:px-10">
      <div className="mx-auto max-w-5xl">
        <h2 className="mb-10 text-center font-['Bricolage_Grotesque',ui-sans-serif,system-ui,sans-serif] text-[clamp(32px,4vw,50px)] font-semibold leading-[1.2] text-black">{heading}</h2>

        <div className="divide-y divide-neutral-200 border-y border-neutral-200">
          {faqs.map((item, index) => {
            const open = openIndex === index;
            return (
              <div key={item.question} className="py-1 md:py-4">
                <button
                  type="button"
                  onClick={() => setOpenIndex(open ? null : index)}
                  aria-expanded={open}
                  className="flex w-full items-center justify-between gap-6 py-4 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-black/40"
                >
                  <span className="text-xl font-medium text-neutral-900 md:text-2xl">{item.question}</span>
                  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.75} aria-hidden className={`h-7 w-7 shrink-0 text-neutral-500 transition-transform duration-300 ${open ? "" : "rotate-180"}`}>
                    <circle cx="12" cy="12" r="10" />
                    <path d="m8 14 4-4 4 4" />
                  </svg>
                </button>
                <div className={`grid transition-all duration-300 ease-in-out ${open ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`}>
                  <div className="overflow-hidden">
                    <p className="pb-4 text-base leading-relaxed text-neutral-600 md:text-lg">{item.answer}</p>
                  </div>
                </div>
              </div>
            );
          })}
        </div>
      </div>
    </section>
  );
}

How to use it

  1. Make sure your Next.js or React project has Tailwind CSS set up.
  2. Create components/AccordionFAQs.tsx and paste the code.
  3. Import it into a page and replace the placeholder text and images with your own.
Clay - Modern Real Estate Next.js Template
From the full template
Clay - Modern Real Estate Next.js Template$49

This section is one part of Clay - Modern Real Estate Next.js Template: a complete website with every page, Sanity CMS and SEO already set up.

Get the full template Get the full template Live preview Live preview

More free components

All accordions →
Sticky FAQ Accordion

Sticky FAQ Accordion

Count-Up Stats

Count-Up Stats

Expanding Image Panels

Expanding Image Panels

Ready for a faster site that's easier to edit?

Book a free 30-minute call. We'll review your current site and send a fixed-price plan. No pressure, no pitch.

Book Free Call Book Free Call No commitment required

Fast Next.js + Sanity websites, built for you or ready to launch with our templates.

Book a Free Call Book a Free Call
Services
  • Web Design
  • UI/UX Design
  • Framer Dev
  • Webflow Dev
  • Custom Dev
  • Sanity CMS
Resources
  • Templates
  • Pricing
  • License
  • Components
  • Case Studies
Company
  • About Us
  • Contact
  • Privacy Policy
© 2026 rayso.studio — All rights reservedDesigned & built in-house Remote-first agency
Let's TalkLet's Talk