Installation
Usage
import GroupedFAQSection from "@/components/ruixen/grouped-faq-section";
// Defaults — Installation / Stack Support / Pricing & License
<GroupedFAQSection />;Custom groups
<GroupedFAQSection
title="Help Center"
description="Common questions and answers."
groups={[
{
title: "Account",
items: [
{
question: "How do I sign up?",
answer: "Visit the signup page at /signup.",
},
{
question: "How do I reset my password?",
answer: "Click 'Forgot password' on the login screen.",
},
],
},
{
title: "Billing",
items: [
{
question: "When do I get charged?",
answer: "On the same day each month, starting from your signup date.",
},
],
},
]}
contactCTA="our team"
contactHref="/contact"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | "Frequently Asked Questions" | Section heading |
description | string | Default copy | Subheading paragraph |
groups | GroupedFAQGroup[] | 3 default groups | Categorized FAQ groups, each with title and items |
contactPrompt | string | "Can't find what you're looking for? Contact our" | Lead text before the contact link |
contactCTA | string | "support team" | Anchor text |
contactHref | string | "#" | Anchor href |
className | string | — | Extra classes on the outer <section> |
GroupedFAQGroup:
interface GroupedFAQGroup {
title: string;
items: GroupedFAQItem[];
}
interface GroupedFAQItem {
question: string;
answer: string;
}Notes
- Built on shadcn's
Accordionprimitive — works seamlessly across Tailwind v3/v4 and Radix/Base UI registry variants. - Closed items render a thin bottom border via the trigger. Open items get the card treatment (rounded corners, ring, shadow, tinted background).
type="single"collapsible— only one item open per group at a time.- Mobile padding via
max-md:px-6; onmd+the groups shift left by-ml-6to align with the title's natural padding.

