# FAQ Page

> A React FAQ page template: a big search, topic cards with counts, 21 answers in five categories, help options and a call to action.

- Type: React template (Templates)
- Access: Free (the source is open to everyone)
- Version: 1.1.0
- Install: `npx wingo-ui@latest add faq-page`
- Docs: https://wingo-ui.com/templates/faq-page

## Interaction

Type in the big search (press / to focus it from anywhere): the answers filter as you type across every topic, the field shows how many match, matching words are marked in the answers, the best match opens, and the topic cards step aside so the results sit right under the field. Enter scrolls to the results; Escape or Clear search brings everything back. Popular searches under the field fill it in one tap (tap again to clear). Each topic card counts its answers; picking one selects that topic in the FAQ and glides down to it (pick it again for all topics). The topic row above the questions switches categories too and scrolls sideways on phones; questions open one at a time. When nothing matches, an empty state offers Clear search and Contact support. With syncUrl the search and topic live in the address bar (?q=invoices#billing), so links open the page already filtered. Below, three help cards (docs, community, support) are each one link, and a call to action band closes the page. The hero rises in once on mount; reduced motion keeps it still.

## Installation

```bash
npx wingo-ui@latest add faq-page
```

The CLI adds the files, their dependencies and a version record for updates.

With shadcn: `npx shadcn@latest add https://wingo-ui.com/r/faq-page.json`

Files:

- `components/templates/faq-page.tsx`
- `components/templates/faq-page-data.ts`

npm dependencies: `npm i motion lucide-react`

Wingo UI dependencies (installed automatically):

- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Marketing Footer](https://wingo-ui.com/components/marketing-footer) ([Markdown](https://wingo-ui.com/components/marketing-footer.md))
- [FAQ Section](https://wingo-ui.com/components/faq-section) ([Markdown](https://wingo-ui.com/components/faq-section.md))
- [CTA Section](https://wingo-ui.com/components/cta-section) ([Markdown](https://wingo-ui.com/components/cta-section.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Empty State](https://wingo-ui.com/components/empty-state) ([Markdown](https://wingo-ui.com/components/empty-state.md))
- [Search Input](https://wingo-ui.com/components/search-input) ([Markdown](https://wingo-ui.com/components/search-input.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.md))
- [Motion presets](https://wingo-ui.com/components/motion) ([Markdown](https://wingo-ui.com/components/motion.md))
- [Tones](https://wingo-ui.com/components/tones) ([Markdown](https://wingo-ui.com/components/tones.md))
- [UIProvider](https://wingo-ui.com/components/ui-config) ([Markdown](https://wingo-ui.com/components/ui-config.md))

## Usage

```tsx
// app/(marketing)/faq/page.tsx
"use client"

import Link from "next/link"
import { FaqPage } from "@/components/templates/faq-page"

export default function FaqRoute() {
  return (
    <FaqPage
      linkComponent={Link}
      onSearch={(query) => {
        // count what people look for, to write the next answers
        void fetch("/api/search-log", { method: "POST", body: query })
      }}
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `design?` | `"classic" \| "minimal" \| "editorial"` | `"classic"` | The whole page's look. classic: the layout props, a grid backdrop, raised topic and help cards and a solid closing band; minimal: a transparent header, a plain page, a flat search field, outlined chips and topic cards, a borderless FAQ, flat help cards, no band, a plain closing call and a simple footer; editorial: a soft wash, a centered header, huge start-aligned type and an underlined search in one narrow column, the topics as a numbered index, numbered questions, help options as ruled rows and a wordmark footer. headerProps and footerProps still win. |
| `background?` | `"plain" \| "soft" \| "glow" \| "aurora" \| "grid" \| "dots"` | `"grid"` | The main background: plain is the bare page color; the others tint the page and add a glow, an aurora, a grid or dots over the first screen. A design picks its own unless you set one. |
| `backgroundColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint and glow color of the main background. Without one, a non-neutral tone tints the page. |
| `bandBackground?` | `"muted" \| "tinted" \| "gradient" \| "dots"` | `"muted"` | The secondary background of the alternating bands. Cards, fields and tiles inside a band are lifted one step above it, so they never share its color. |
| `bandColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint of tinted and gradient bands; defaults to backgroundColor. |
| `topics?` | `FaqPageTopic[]` | `"FAQ_PAGE_TOPICS"` | { value, label, icon?, description? }: the topic cards and the FAQ categories; value matches FaqItem.category. |
| `items?` | `FaqItem[]` | `"FAQ_PAGE_ITEMS"` | { id?, question, answer, answerText?, category? }: 21 sample questions across five topics. |
| `popular?` | `string[]` | `"FAQ_PAGE_POPULAR"` | Quick searches under the field; an empty array hides the row. |
| `help?` | `FaqPageHelpOption[]` | `"FAQ_PAGE_HELP"` | { icon?, title, description, href, action }: the Still need help? cards. |
| `labels?` | `Partial<FaqPageLabels>` | `"DEFAULT_FAQ_PAGE_LABELS"` | Every visible string. |
| `defaultCategory?` | `string` | `"all"` | The topic selected on load: all or a topic value. |
| `defaultQuery?` | `string` | `""` | The search on load, like a link from elsewhere would set it. |
| `syncUrl?` | `boolean` | `true` | Reads ?q= and #topic on load (and on hash changes) and keeps them in the address bar. |
| `onSearch?` | `(query: string) => void` |  | Runs on Enter and when a popular search is picked (analytics, a server search). |
| `faqLayout?` | `"centered" \| "split" \| "grid"` | `"centered"` | The FAQ: one column with the topic row, the heading on the left, or two columns with every answer open. Applies to the classic design. |
| `ctaVariant?` | `"inverted" \| "soft" \| "split" \| "plain"` | `"inverted"` | The look of the closing call to action band. Applies to the classic design. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The selected topic card and chip, the popular search in use and the open answer. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The primary button of the call to action band. |
| `showTopics?` | `boolean` | `true` | The topic cards (hidden while searching). |
| `showPopular?` | `boolean` | `true` | The popular searches under the field. |
| `showHelp?` | `boolean` | `true` | The Still need help? cards. |
| `showCta?` | `boolean` | `true` | The call to action band. |
| `jsonLd?` | `boolean` | `true` | A FAQPage json-ld script with every answer, for search engines (left out while searching). |
| `contactHref?` | `string` | `"/contact"` | Where Contact support goes from the empty state. |
| `header?` | `boolean` | `true` | The marketing header; off inside a site layout. |
| `footer?` | `boolean` | `true` | The marketing footer. |
| `headerProps?` | `Partial<MarketingHeaderProps>` |  | Passed to MarketingHeader. |
| `footerProps?` | `Partial<MarketingFooterProps>` |  | Passed to MarketingFooter. |
| `animateIn?` | `boolean` | `true` | The hero rises in once on mount; off in thumbnails and under reduced motion. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"<a>"` | The router link for the header, footer and help cards (next/link in an app). |
| `className?` | `string` |  | Classes for the root. |
| `classNames?` | `Partial<Record<FaqPageSlot, string>>` |  | Classes for header, hero, search, popular, topics, topic, faq, empty, help, cta and footer. |

## Parts

### FAQ_PAGE_SAMPLE (constant)

All the sample content in one object: topics, items, popular and help.

### FAQ_PAGE_TOPICS (constant)

Getting started, Billing, Account, Security and Integrations with lucide icons.

### FAQ_PAGE_ITEMS (constant)

21 sample questions and answers.

### FAQ_PAGE_POPULAR (constant)

Five popular searches.

### FAQ_PAGE_HELP (constant)

Docs, community and support cards.

### DEFAULT_FAQ_PAGE_LABELS (constant)

The English strings.

### FAQ_PAGE_DESIGNS (constant)

The design names, classic first: ["classic", "minimal", "editorial"].

### FaqPageDesign (type)

"classic" | "minimal" | "editorial".

### FaqPageProps (type)

Props of FaqPage: questions, topics, layout switches, labels and callbacks.

### FaqPageTopic (type)

A topic card and FAQ category in one.

### FaqPageHelpOption (type)

One Still need help? card.

## Examples

- **Minimal design**: design="minimal": a transparent header, no grid, a flat search, outlined topics and help cards, no gray band.
- **Editorial design**: design="editorial": huge start-aligned type in one narrow column, a numbered topic index and numbered questions.
- **Brand help center**: tone and ctaTone brand: the selected topic, chips and the call to action in orange.
- **Opened from a search link**: defaultQuery "invoice": the results with marked words, as /faq?q=invoice would open.
- **Everything open**: faqLayout grid shows every answer in two columns; a soft call to action.
- **Inside a docs site**: No header, footer or call to action: search, topics, answers and help options.

## See also

- [FAQ Section](https://wingo-ui.com/components/faq-section) ([Markdown](https://wingo-ui.com/components/faq-section.md))
- [Search Input](https://wingo-ui.com/components/search-input) ([Markdown](https://wingo-ui.com/components/search-input.md))
- [CTA Section](https://wingo-ui.com/components/cta-section) ([Markdown](https://wingo-ui.com/components/cta-section.md))
- [Accordion](https://wingo-ui.com/components/accordion) ([Markdown](https://wingo-ui.com/components/accordion.md))
- [Contact Page](https://wingo-ui.com/templates/contact-page) ([Markdown](https://wingo-ui.com/templates/contact-page.md))

---

Canonical: https://wingo-ui.com/templates/faq-page
More components: https://wingo-ui.com/components · Index for agents: https://wingo-ui.com/llms.txt
