# Help Article Page

> One support article: search, a topic sidebar, a Markdown body with steps and callouts, contents and helpful feedback.

- Type: React template (Templates)
- Access: Pro (the source needs a Wingo UI Pro plan, see https://wingo-ui.com/pricing)
- Version: 1.1.0
- Install: `npx wingo-ui@latest add help-article-page`
- Docs: https://wingo-ui.com/templates/help-article-page

## Interaction

The breadcrumb links back to the help center and the article's topic (on phones it becomes one back link). Press / anywhere to focus the search bar: matching articles from every topic drop down under it with the typed words marked, Arrow Down moves into them, the arrow keys, Home and End walk through them, Escape returns to the field and a press outside closes them. On desktop the sidebar sticks beside the article with every article of the topic (the current one marked) and the other topics; below 1024px it is a button that opens it as a bottom sheet, which closes when you pick a link. The article is rendered from Markdown: numbered steps, Note / Tip / Warning callouts, key caps that show the right modifier for the device, a table that scrolls sideways on phones and a code block with a copy button. From 1280px the table of contents sticks on the right and marks the section being read; below it becomes a pill pinned under the header that opens a sheet. Was this article helpful? thanks you on Yes; No opens a comment box (focused, Cmd/Ctrl+Enter sends, Skip closes it) that ends in a thank-you. The contact card opens an email or the chat, and each related article is one link with the focus ring on the card.

## Installation

```bash
npx wingo-ui@latest add help-article-page
```

Pro item: run `npx wingo-ui@latest login` once with a Pro account. The CLI adds the files, their dependencies and a version record for updates.

With shadcn: `npx shadcn@latest add @wingo-ui/help-article-page` (needs the @wingo-ui registry with your API key in components.json)

Files:

- `components/templates/help-article-page.tsx`
- `components/templates/help-article-page-data.ts`

npm dependencies: `npm i motion lucide-react`

Wingo UI dependencies (installed automatically):

- [Help Center Page](https://wingo-ui.com/templates/help-center-page) ([Markdown](https://wingo-ui.com/templates/help-center-page.md))
- [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))
- [Avatar](https://wingo-ui.com/components/avatar) ([Markdown](https://wingo-ui.com/components/avatar.md))
- [Breadcrumb](https://wingo-ui.com/components/breadcrumb) ([Markdown](https://wingo-ui.com/components/breadcrumb.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Kbd](https://wingo-ui.com/components/kbd) ([Markdown](https://wingo-ui.com/components/kbd.md))
- [Markdown](https://wingo-ui.com/components/markdown) ([Markdown](https://wingo-ui.com/components/markdown.md))
- [Search Input](https://wingo-ui.com/components/search-input) ([Markdown](https://wingo-ui.com/components/search-input.md))
- [Sheet](https://wingo-ui.com/components/sheet) ([Markdown](https://wingo-ui.com/components/sheet.md))
- [Table Of Contents](https://wingo-ui.com/components/table-of-contents) ([Markdown](https://wingo-ui.com/components/table-of-contents.md))
- [Textarea](https://wingo-ui.com/components/textarea) ([Markdown](https://wingo-ui.com/components/textarea.md))
- [useControllableState](https://wingo-ui.com/components/use-controllable-state) ([Markdown](https://wingo-ui.com/components/use-controllable-state.md))
- [Motion presets](https://wingo-ui.com/components/motion) ([Markdown](https://wingo-ui.com/components/motion.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.md))
- [Text match](https://wingo-ui.com/components/text-match) ([Markdown](https://wingo-ui.com/components/text-match.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)/help/[slug]/page.tsx
"use client"

import Link from "next/link"
import { notFound, useParams } from "next/navigation"
import { HelpArticlePage } from "@/components/templates/help-article-page"
import { HELP_ARTICLE_SAMPLE } from "@/components/templates/help-article-page-data"

export default function HelpArticleRoute() {
  const { slug } = useParams<{ slug: string }>()
  if (slug !== HELP_ARTICLE_SAMPLE.slug) notFound()
  return (
    <HelpArticlePage
      linkComponent={Link}
      article={HELP_ARTICLE_SAMPLE}
      onFeedback={(helpful, comment) =>
        fetch("/api/help-feedback", { method: "POST", body: JSON.stringify({ slug, helpful, comment }) })
      }
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `design?` | `"classic" \| "minimal"` | `"classic"` | The whole page's look. classic: a tinted search bar, tinted sidebar items, a gray feedback box, raised contact and related cards on a band; minimal: a transparent header, a flat search, a ruled sidebar, callouts as colored rules, outlined boxes, related articles as hairline rows with no band and a simple footer. headerProps and footerProps still win. |
| `article?` | `HelpArticle` | `"HELP_ARTICLE_SAMPLE"` | The article: HelpCenterArticle fields (slug, title, excerpt, category, minutes, updated) plus summary, body (Markdown), author and helpful ({ yes, total }). In the body, > [!NOTE] / [!TIP] / [!IMPORTANT] / [!WARNING] / [!CAUTION] quotes become callouts and `kbd:mod+k` inline code becomes a key cap. |
| `articles?` | `HelpCenterArticle[]` | `"HELP_CENTER_ARTICLES"` | The sidebar's topic list and what the search looks through; each links to /help/<slug>. |
| `categories?` | `HelpCenterCategory[]` | `"HELP_CENTER_CATEGORIES"` | The topics: the breadcrumb, the sidebar and the result labels; each links to /help/<value>. |
| `relatedArticles?` | `HelpCenterArticle[]` | `"HELP_ARTICLE_RELATED"` | Up to three cards under the article. |
| `labels?` | `Partial<HelpArticlePageLabels>` | `"DEFAULT_HELP_ARTICLE_PAGE_LABELS"` | Every visible string: search, sidebar, meta, callout titles, feedback, contact and related copy. |
| `headerProps?` | `Partial<MarketingHeaderProps>` |  | Passed to MarketingHeader. |
| `footerProps?` | `Partial<MarketingFooterProps>` |  | Passed to MarketingFooter. |
| `defaultQuery?` | `string` | `""` | The search text on load, with the results open. The playground offers a few real searches and one with no results. |
| `query?` | `string` |  | Controlled search text; pair it with onQueryChange. |
| `onQueryChange?` | `(query: string) => void` |  | Fires on every keystroke and clear. |
| `onSearch?` | `(query: string) => void` |  | Runs once typing pauses and on Enter; with "" on clear. Use it for analytics or a server search. |
| `searchShortcut?` | `string` | `"/"` | Focuses the search from anywhere; "" binds nothing. |
| `showSearch?` | `boolean` | `true` | The search bar beside the breadcrumb. |
| `showSidebar?` | `boolean` | `true` | The topic sidebar (a sheet below 1024px). |
| `showToc?` | `boolean` | `true` | The table of contents: sticky on the right from 1280px, a pill and a sheet below. |
| `showMeta?` | `boolean` | `true` | The author, last updated date and reading time under the title. |
| `showFeedback?` | `boolean` | `true` | The "Was this article helpful?" box. |
| `showContact?` | `boolean` | `true` | The contact support card after the article. |
| `showRelated?` | `boolean` | `true` | The related articles section. |
| `header?` | `boolean` | `true` | The sticky marketing header; turn it off when the page sits in a site layout. |
| `footer?` | `boolean` | `true` | The marketing footer. |
| `tocVariant?` | `"line" \| "dots" \| "plain"` | `"line"` | The table of contents' look: a rail with a moving indicator, dots or plain links. |
| `background?` | `"plain" \| "soft" \| "glow" \| "aurora" \| "grid" \| "dots"` | `"glow"` | 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 (classic glow, minimal plain). |
| `backgroundColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint and glow color of the main background. |
| `bandBackground?` | `"muted" \| "tinted" \| "gradient" \| "dots"` | `"muted"` | The secondary background of the 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. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | Links in the article and the active contents entry. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The solid buttons: Chat with us, Send feedback and the header's Get started. |
| `animateIn?` | `boolean` | `true` | The title rises in once on mount; off in thumbnails and under reduced motion. |
| `locale?` | `string` | `"en-US"` | Intl locale for the last updated date. |
| `helpHref?` | `string` | `"/help"` | The help center root: the breadcrumb, Back to the help center, /help/<topic> and /help/<slug>. |
| `chatHref?` | `string` | `"/contact?topic=chat"` | Where Chat with us goes. |
| `supportEmail?` | `string` | `"support@acme.com"` | Email support opens a message to it, with the article title as the subject. |
| `onFeedback?` | `(helpful: boolean, comment?: string) => (void \| Promise<unknown>)` |  | Was this article helpful?; called on Yes, on No and again with the comment. A returned promise keeps the button loading; without it the page waits 600 ms. |
| `markdownProps?` | `Partial<MarkdownProps>` |  | Passed to the article's Markdown (components, rehypePlugins, codeLineNumbers...). |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"<a>"` | The router link for every link (next/link in an app); default the LinkProvider's. |
| `className?` | `string` |  | Classes for the root. |
| `classNames?` | `Partial<Record<HelpArticlePageSlot, string>>` |  | Classes for hero, breadcrumb, search, results, sidebar, sidebarTrigger, title, meta, toc, body, feedback, contact and related. |

## Parts

### helpArticleToc (function)

helpArticleToc(source) returns the h2 and h3 of a Markdown string as TocItem[], with the ids Markdown's headingIds gives them.

### HELP_ARTICLE_SAMPLE (constant)

The sample article: "Set up recurring tasks" in Boards and planning, by Ava Thompson.

### HELP_ARTICLE_RELATED (constant)

Three related articles from HELP_CENTER_ARTICLES.

### DEFAULT_HELP_ARTICLE_PAGE_LABELS (constant)

The English strings.

### HELP_ARTICLE_PAGE_DESIGNS (constant)

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

### HelpArticle (type)

HelpCenterArticle & { summary?, body, author?, helpful? }.

### HelpArticleAuthor (type)

{ name, role, avatar? }.

### HelpArticleCallout (type)

"note" | "tip" | "important" | "warning" | "caution".

### HelpArticlePageLabels (type)

Every UI string of the page (search, breadcrumb, feedback, table of contents), so you can translate or reword it.

### HelpArticlePageProps (type)

Props of HelpArticlePage.

### HelpArticlePageDesign (type)

"classic" | "minimal".

## Examples

- **Minimal design**: design="minimal": a transparent header, a flat search, a ruled sidebar, outlined boxes and related articles as hairline rows.
- **Searching**: A query typed into the search bar: matching articles from every topic, the words marked, arrow keys to move.
- **Brand tone**: The marketing orange on links, the active contents entry and the Chat with us button.
- **Inside a docs layout**: Header, footer, sidebar and related articles off: just the search bar, the article and the feedback box.

## See also

- [Help Center Page](https://wingo-ui.com/templates/help-center-page) ([Markdown](https://wingo-ui.com/templates/help-center-page.md))
- [Blog Post Page](https://wingo-ui.com/templates/blog-post-page) ([Markdown](https://wingo-ui.com/templates/blog-post-page.md))
- [Markdown](https://wingo-ui.com/components/markdown) ([Markdown](https://wingo-ui.com/components/markdown.md))
- [Table Of Contents](https://wingo-ui.com/components/table-of-contents) ([Markdown](https://wingo-ui.com/components/table-of-contents.md))
- [Kbd](https://wingo-ui.com/components/kbd) ([Markdown](https://wingo-ui.com/components/kbd.md))

---

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