# Docs Home Page

> A React docs portal home template: a search palette, quick-start cards, popular guides, API code samples, SDK tiles and the changelog.

- 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 docs-home-page`
- Docs: https://wingo-ui.com/templates/docs-home-page

## Interaction

Press the big search field in the hero, the Search field in the header, or Cmd+K / Ctrl+K anywhere: a search palette opens with results grouped under Guides, API reference, SDKs and Changelog. Type to filter (matches are bold), move with the arrow keys, Enter opens the page and Escape closes; the Popular chips under the field open it with that word already typed. On phones the palette is a full-height sheet. The four quick-start cards, every guide, SDK tile, changelog entry and help option are one link each with the focus ring on the card. In the API section the curl, JavaScript and Python tabs switch the code sample (arrow keys move between tabs) and its copy button copies the snippet; each SDK tile copies its install command. The status option pulses green. The header keeps Guides as a dropdown and folds into a menu sheet below 1024px; cards stack to one column on phones without sideways scrolling.

## Installation

```bash
npx wingo-ui@latest add docs-home-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/docs-home-page` (needs the @wingo-ui registry with your API key in components.json)

Files:

- `components/templates/docs-home-page.tsx`
- `components/templates/docs-home-page-data.ts`

npm dependencies: `npm i lucide-react`

Wingo UI dependencies (installed automatically):

- [Feature Grid](https://wingo-ui.com/components/feature-grid) ([Markdown](https://wingo-ui.com/components/feature-grid.md))
- [Hero Section](https://wingo-ui.com/components/hero-section) ([Markdown](https://wingo-ui.com/components/hero-section.md))
- [Marketing Footer](https://wingo-ui.com/components/marketing-footer) ([Markdown](https://wingo-ui.com/components/marketing-footer.md))
- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Code Block](https://wingo-ui.com/components/code-block) ([Markdown](https://wingo-ui.com/components/code-block.md))
- [Command Menu](https://wingo-ui.com/components/command-menu) ([Markdown](https://wingo-ui.com/components/command-menu.md))
- [Copy Button](https://wingo-ui.com/components/copy-button) ([Markdown](https://wingo-ui.com/components/copy-button.md))
- [Nav Menu](https://wingo-ui.com/components/nav-menu) ([Markdown](https://wingo-ui.com/components/nav-menu.md))
- [Tabs](https://wingo-ui.com/components/tabs) ([Markdown](https://wingo-ui.com/components/tabs.md))
- [useControllableState](https://wingo-ui.com/components/use-controllable-state) ([Markdown](https://wingo-ui.com/components/use-controllable-state.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.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/(docs)/docs/page.tsx
"use client"

import Link from "next/link"
import { DocsHomePage } from "@/components/templates/docs-home-page"
import { DOCS_SEARCH } from "@/components/templates/docs-home-page-data"

export default function DocsRoute() {
  return (
    <DocsHomePage
      linkComponent={Link}
      searchGroups={DOCS_SEARCH}
      onSearchSelect={(item) => console.log("search pick", item.href)}
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `navItems?` | `NavMenuItem[]` | `"DOCS_NAV"` | The header links: Guides (a dropdown), API, SDKs, Changelog and Support. |
| `quickStart?` | `DocsQuickStart[]` | `"DOCS_QUICK_START"` | The starting-point cards: { icon, title, description, href }. |
| `guides?` | `DocsGuide[]` | `"DOCS_GUIDES"` | Popular guides: { title, description, category, minutes, href }. |
| `codeSamples?` | `DocsCodeSample[]` | `"DOCS_CODE_SAMPLES"` | The API tabs: { value, label, language, filename, code }. |
| `apiFacts?` | `{ label: string; value: string }[]` | `"DOCS_API_FACTS"` | The four tiles beside the code: base URL, auth, rate limit, format. |
| `sdks?` | `DocsSdk[]` | `"DOCS_SDKS"` | SDK tiles: { letters, name, install, version, href, color }. |
| `changelog?` | `DocsChangelogEntry[]` | `"DOCS_CHANGELOG"` | The latest entries: { version, date, kind, title, description, href }. |
| `help?` | `DocsHelpOption[]` | `"DOCS_HELP"` | Community, support and status: { icon, title, description, meta, action, href, live? }. |
| `searchGroups?` | `DocsSearchGroup[]` | `"DOCS_SEARCH"` | What the search palette searches: { label, items: { title, description?, href, keywords? }[] }. |
| `popularSearches?` | `string[]` | `"DOCS_POPULAR_SEARCHES"` | Chips under the hero search that open it with that query. |
| `labels?` | `Partial<DocsHomePageLabels>` | `"DEFAULT_DOCS_HOME_PAGE_LABELS"` | Every visible string. |
| `searchShortcut?` | `string` | `"mod+k"` | Opens the search from anywhere and shows on the fields; empty binds nothing. |
| `defaultSearchOpen?` | `boolean` | `false` | The search palette starts open. |
| `searchOpen?` | `boolean` |  | Controlled open state of the search palette. |
| `onSearchOpenChange?` | `(open: boolean) => void` |  | Called when the palette opens or closes. |
| `onSearchSelect?` | `(item: { title, href, group }) => void` |  | Called when a result is picked; the page also navigates to its href. |
| `defaultLanguage?` | `string` | `"curl"` | The code tab the API section opens on (a codeSamples value). |
| `showQuickStart?` | `boolean` | `true` | The quick-start cards. |
| `showGuides?` | `boolean` | `true` | The popular guides. |
| `showApi?` | `boolean` | `true` | The API section with code tabs. |
| `showSdks?` | `boolean` | `true` | The SDK tiles built from sdks, each with its install command. |
| `showChangelog?` | `boolean` | `true` | The latest changelog entries. |
| `showHelp?` | `boolean` | `true` | Community, support and status. |
| `header?` | `boolean` | `true` | The sticky docs header; turn it off when the page sits in a site layout. |
| `footer?` | `boolean` | `true` | The marketing footer. |
| `headerProps?` | `Partial<MarketingHeaderProps>` |  | Passed to MarketingHeader (replaces the docs actions when you pass actions). |
| `footerProps?` | `Partial<MarketingFooterProps>` |  | Passed to MarketingFooter. |
| `design?` | `"classic" \| "minimal"` | `"classic"` | The whole page's look. classic follows the layout props on a dotted backdrop; minimal: a transparent header, a soft wash, the copy and search beside a drawn terminal, the starting points as a plain list, guides, SDKs and help as flat rows under hairlines, API facts on soft tiles, no bands, tighter sections and a simple footer. headerProps and footerProps still win. |
| `background?` | `"plain" \| "soft" \| "glow" \| "aurora" \| "grid" \| "dots"` | `"dots"` | 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. |
| `heroBackground?` | `"grid" \| "glow" \| "none"` | `"none"` | Faint lines, a soft light in the tone, or nothing behind the hero, over the page background. Without one it is grid when background is plain and none otherwise. Applies to the classic design. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | Icon tiles, the code tabs and the announcement badge. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The solid buttons (Get an API key, API reference). |
| `codeAccent?` | `string` | `"#F75001"` | The code block theme color. |
| `animateIn?` | `boolean` | `true` | The hero rises in once on mount; off in thumbnails and under reduced motion. |
| `locale?` | `string` | `"en-US"` | Intl locale for the changelog dates. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"<a>"` | The router link for every link and search result (next/link in an app); default the LinkProvider's. |
| `className?` | `string` |  | Classes for the root. |
| `classNames?` | `Partial<Record<DocsHomePageSlot, string>>` |  | Classes for hero, search, quickStart, guides, api, sdks, changelog and help. |

## Parts

### DocsGuideCard (component)

One guide as a single stretched link: category, reading time, title and summary. Takes article props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `guide?` | `DocsGuide` |  | The guide. |
| `minutes?` | `(minutes: number) => string` |  | "6 min". |
| `linkComponent?` | `LinkComponent` |  | The router link. |

### DocsSdkTile (component)

An SDK as a letter tile, name, version and a copyable install command; the tile links to the SDK docs. Takes article props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `sdk?` | `DocsSdk` |  | The SDK. |
| `copyLabel?` | `string` |  | The copy button's label. |
| `linkComponent?` | `LinkComponent` |  | The router link. |

### DOCS_NAV (constant)

The docs header navigation.

### DOCS_POPULAR_SEARCHES (constant)

Webhooks, Rate limits, Pagination and OAuth.

### DOCS_QUICK_START (constant)

Get started, Guides, API reference and SDKs.

### DOCS_GUIDES (constant)

Six popular Acme API guides.

### DOCS_CODE_SAMPLES (constant)

Create a task with curl, JavaScript and Python.

### DOCS_API_FACTS (constant)

Base URL, auth, rate limit and format.

### DOCS_SDKS (constant)

JavaScript, Python, Go, Ruby, PHP and Swift.

### DOCS_CHANGELOG (constant)

The three latest API changes.

### DOCS_HELP (constant)

Community, Support and Status.

### DOCS_SEARCH (constant)

The search index, grouped by section.

### DEFAULT_DOCS_HOME_PAGE_LABELS (constant)

The English strings.

### DocsSearchItemPicked (type)

{ title, href, group }: what onSearchSelect receives.

### DocsQuickStart (type)

{ icon, title, description, href }.

### DocsGuide (type)

{ title, description, category, minutes, href }.

### DocsCodeSample (type)

{ value, label, language, filename, code }.

### DocsSdk (type)

{ letters, name, install, version, href, color }.

### DocsChangelogEntry (type)

{ version, date, kind, title, description, href }.

### DocsHelpOption (type)

{ icon, title, description, meta, action, href, live? }.

### DocsSearchGroup (type)

{ label, items: DocsSearchItem[] }.

### DocsSearchItem (type)

{ title, description?, href, keywords? }.

### DOCS_HOME_PAGE_DESIGNS (constant)

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

### DocsHomePageProps (type)

Props of DocsHomePage.

### DocsHomePageDesign (type)

"classic" | "minimal".

## Examples

- **Minimal design**: design="minimal": the search beside a drawn terminal, flat rows under hairlines, no gray bands and a simple footer.
- **Search open**: The palette open over the page, results grouped by section; type, arrow through and press Enter.
- **Brand tone, glow**: The marketing orange on icon tiles, tabs and buttons, with an orange page glow behind the hero.
- **Python first, blue code**: The API section opens on the Python tab with a blue code theme.
- **Compact, inside a docs layout**: No header or footer, no SDKs or changelog: the landing inside an existing docs shell.

## See also

- [Command Menu](https://wingo-ui.com/components/command-menu) ([Markdown](https://wingo-ui.com/components/command-menu.md))
- [Code Block](https://wingo-ui.com/components/code-block) ([Markdown](https://wingo-ui.com/components/code-block.md))
- [Feature Grid](https://wingo-ui.com/components/feature-grid) ([Markdown](https://wingo-ui.com/components/feature-grid.md))
- [Hero Section](https://wingo-ui.com/components/hero-section) ([Markdown](https://wingo-ui.com/components/hero-section.md))
- [Changelog Page](https://wingo-ui.com/templates/changelog-page) ([Markdown](https://wingo-ui.com/templates/changelog-page.md))

---

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