FAQ Section React block for Tailwind CSS v4
v1.0.0Added in 1.6.0
A React FAQ section for marketing pages: an accordion, a split layout, an open grid or expandable cards, with topics and live search.
Click or tap a question to open its answer (Enter and Space on the keyboard, arrow keys move between questions); in single mode opening one closes the other. The topics row filters the list: on phones it scrolls sideways, arrows move between topics. With search on, typing filters questions and answers live, opens every answer that holds the words and marks each match; when nothing matches, an empty state offers to search all topics or contact the team. Links inside answers are underlined. In the split layout the heading and contact card stay in view while the questions scroll on desktop. The grid layout shows every answer at once, one column on phones. The cards layout gives each question its own raised card that expands in place (a button with aria-expanded controlling its answer region), topic chips with counts on top, two columns from 768px and one on phones.
FAQ Section is a free React block in the React marketing sections category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add faq-section, together with Marketing Section, Accordion, Button, Search Input, Segmented Control and 5 more and the npm packages motion and lucide-react.
Built with
The sections this page is made of. In the full-screen preview, hold Alt to outline each one on the page.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add faq-sectionUsage
Import FaqSection from @/components/blocks/faq-section.
// app/(marketing)/faq/page.tsx
"use client"
import Link from "next/link"
import { FaqSection, FAQ_SECTION_CATEGORIES, type FaqItem } from "@/components/blocks/faq-section"
const questions: FaqItem[] = [
{ category: "billing", question: "Can I cancel at any time?", answer: "Yes. You keep access until the end of the billing period." },
{
category: "account",
question: "How do I invite my team?",
answer: (
<>
Open Settings, then Members. <Link href="/docs/members">Read the guide</Link>.
</>
),
},
]
export default function FaqPage() {
return (
<FaqSection
headingAs="h1"
items={questions}
categories={FAQ_SECTION_CATEGORIES}
searchable
jsonLd
linkComponent={Link}
/>
)
}Props
eyebrowdefault"FAQ"ReactNodeThe small uppercase line over the title.
titledefault"Frequently asked questions"ReactNodeThe section title.
descriptiondefault"Everything about plans, your account and your data. Can't find an answer? We are one message away."ReactNodeThe muted paragraph under the title.
actionsReactNodeButtons under the description.
itemsdefault"FAQ_SECTION_SAMPLE"FaqItem[]{ question, answer, answerText?, category?, id? }; answer is any node, links in it are underlined.
categoriesdefault"FAQ_SECTION_CATEGORIES"FaqCategory[]{ value, label, icon? } topics; only topics that hold a question show, and the row hides below two. In the cards layout they show as chips and as a label on each card.
showCategoriesdefaulttruebooleanThe topics row that filters the list.
categorystringThe selected topic (controlled); "all" or a category value.
defaultCategorydefault"all"stringThe topic selected at first.
onCategoryChange(category: string) => voidRuns when a topic is picked.
searchabledefaultfalsebooleanA search field that filters questions and answers as you type and marks the matches.
layoutdefault"centered""centered" | "split" | "grid" | "cards"centered: one 720px column; split: heading and contact card on the left (sticky on desktop); grid: two columns, always open; cards: a raised card per question in two columns that opens in place, with topic chips and counts on top.
typedefault"single""single" | "multiple"single: one answer open at a time; multiple: any number.
defaultOpendefaulttruebooleanThe first question starts open.
variantdefault"ghost""ghost" | "outline" | "soft" | "separated"The accordion look: hairlines, one outlined or tinted box, or a card per question.
indicatordefault"plus""chevron" | "plus" | "none"The open / closed sign at the end of each question (in the cards layout a round badge that fills with the tone when open).
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The selected topic, the open question's sign and the contact button.
contactdefaulttruebooleanThe "Still have questions?" card.
contactHrefdefault"/contact"stringWhere the contact buttons link.
jsonLddefaultfalsebooleanAdds a FAQPage JSON-LD script with the plain text of every answer, for rich results in search.
aligndefault"center""start" | "center"Where the heading sits (split always starts).
headingSizedefault"md""md" | "lg"lg when the section opens the page (a FAQ page).
headingAsdefault"h2""h1" | "h2" | "h3"The title element: h1 on a FAQ page, h2 inside a longer page.
widthdefault"auto""auto" | "sm" | "md" | "lg" | "xl"The column; auto picks by layout (centered sm 720px, the others lg 1200px).
backgrounddefault"none""none" | "muted"muted: a gray band that sets the section apart.
spacingdefault"md""none" | "sm" | "md" | "lg"Vertical padding, from MarketingSection.
linkComponentdefault""a""(props: LinkComponentProps) => ReactNodeThe router link (or "a") for the contact buttons; default the LinkProvider's (links inside answers use the provider).
labelsPartial<FaqSectionLabels>all, categories, searchLabel, searchPlaceholder, empty ({query}), emptyDescription, searchAll, contactTitle, contactDescription, contactAction.
classNamestringClasses for the <section>.
classNamesPartial<Record<FaqSectionSlot, string>>Classes for heading, aside, toolbar, categories, search, list, item, question, answer, empty and contact.
Parts
FAQ_SECTION_SAMPLE
constantTwelve Acme questions across billing, account, security and integrations.
FAQ_SECTION_CATEGORIES
constantThe four sample topics: Billing, Account, Security, Integrations.
DEFAULT_FAQ_SECTION_LABELS
constantThe English strings.
faqNodeText
functionThe plain text of a node: what search and the JSON-LD read from a rich answer.
FaqItem
type{ question, answer, answerText?, category?, id? }.
FaqCategory
type{ value, label, icon? }.
FaqSectionProps
typeProps of FaqSection.
Examples
Help center with search
Topics and a search field that filters as you type and marks every match.
Split, with the contact card
The heading and a sticky contact card on the left, the questions on the right.
Always open grid
Two columns of short answers with no accordion, on a muted band.
Pricing FAQ, brand tone
Only the billing questions, several open at once, with a FAQPage JSON-LD script for search engines.
Question cards
Each question on its own card that opens in place, with topic chips and counts on top.
Dependencies
Files
- components/blocks/faq-section.tsx
FAQ
Is the React FAQ Section block free?
Yes. The source is free and needs no account: copy it from the Code tab or install it with the CLI.
How do I install FAQ Section?
Run npx wingo-ui@latest add faq-section. It also adds the Wingo UI items it builds on (Marketing Section, Accordion, Button, Search Input, Segmented Control and 5 more) and the npm packages motion and lucide-react. With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/faq-section.json.
How does FAQ Section behave on phones?
The topics row filters the list: on phones it scrolls sideways, arrows move between topics. The grid layout shows every answer at once, one column on phones.
See also
Used in
More React marketing sections
Articles using this component
- AI SaaS Landing Page Template: The 4 Sections It Needs
Build it: screens and apps9 min read
- Mobile App Landing Page Template: QR Code and Store Links
Build it: screens and apps9 min read
- Claude Code Landing Page That Does Not Look AI-Made
Building UI with AI agents11 min read
- SaaS Comparison Page: Honest vs Pages That Convert
Build it: screens and apps10 min read
New components by email
New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.