Loading...
Loading...
> Accordion-style FAQ with expandable answers and category filtering.
1import { FAQSection } from "@/components/marketing/faq-section";23export default function LandingPage() {4 return (5 <main>6 <HeroSection />7 <FeaturesSection />8 <PricingSection />9 <TestimonialsSection />10 <FAQSection />11 <Footer />12 </main>13 );14}
1const [activeCategory, setActiveCategory] = useState("general");2const categories = ["GENERAL", "TECHNICAL", "PAYMENT", "LICENSE"];34<div className="flex gap-2">5 {categories.map((cat) => (6 <button7 key={cat}8 onClick={() => setActiveCategory(cat.toLowerCase())}9 className={cn(10 "px-4 py-2 border",11 activeCategory === cat.toLowerCase()12 ? "bg-primary text-primary-foreground"13 : "bg-card"14 )}15 >16 {cat}17 </button>18 ))}19</div>
1<Accordion type="single" collapsible>2 <AccordionItem value="item-1">3 <AccordionTrigger>What payment methods?</AccordionTrigger>4 <AccordionContent>5 We accept all major credit cards via Stripe.6 </AccordionContent>7 </AccordionItem>8</Accordion>
| Prop | Type | Default | Description |
|---|---|---|---|
| faqs | { question: string; answer: string; category?: string }[] | - | Array of FAQ items |
| showCategories | boolean | true | Show category filter tabs |
| defaultOpen | number | undefined | Index of initially open item |