# Contact Page

> A React contact page template: a validated form, copyable channels with live office hours, offices on a drawn map, a short FAQ and logos.

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

## Interaction

Pick a topic (Sales, Support, Partnerships, Press) as cards with arrow keys or a tap, then fill in name, work email, company, company size (a bottom sheet on phones) and a message with a live character counter, and tick the consent box. Send message checks every field: each problem shows under its field and focus jumps to the first one; the email is also checked as soon as you leave it, and errors clear as you fix them. Company size is required for Sales only. While onSubmit runs the button spins; then the form turns into a Message sent panel ("Thanks, Emma. We'll reply within one business day.") with Send another, which keeps your name and email. Next to the form (under it on phones) the sales and support addresses and the phone number have copy buttons, Start a chat opens the chat, and Office hours shows Open now or Closed with the next opening, worked out in the office's time zone after the page loads. The office cards show each city's local time; picking one moves the drawn map and its Get directions link. The FAQ opens one answer at a time. The heading, form and channels rise in once on mount; reduced motion keeps them still.

## Installation

```bash
npx wingo-ui@latest add contact-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/contact-page.json`

Files:

- `components/templates/contact-page.tsx`
- `components/templates/contact-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))
- [Logo Cloud](https://wingo-ui.com/components/logo-cloud) ([Markdown](https://wingo-ui.com/components/logo-cloud.md))
- [Badge](https://wingo-ui.com/components/badge) ([Markdown](https://wingo-ui.com/components/badge.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Checkbox](https://wingo-ui.com/components/checkbox) ([Markdown](https://wingo-ui.com/components/checkbox.md))
- [Copy Button](https://wingo-ui.com/components/copy-button) ([Markdown](https://wingo-ui.com/components/copy-button.md))
- [Field](https://wingo-ui.com/components/field) ([Markdown](https://wingo-ui.com/components/field.md))
- [Input](https://wingo-ui.com/components/input) ([Markdown](https://wingo-ui.com/components/input.md))
- [Radio Group](https://wingo-ui.com/components/radio-group) ([Markdown](https://wingo-ui.com/components/radio-group.md))
- [Select](https://wingo-ui.com/components/select) ([Markdown](https://wingo-ui.com/components/select.md))
- [Textarea](https://wingo-ui.com/components/textarea) ([Markdown](https://wingo-ui.com/components/textarea.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)/contact/page.tsx
"use client"

import Link from "next/link"
import { ContactPage } from "@/components/templates/contact-page"

export default function ContactRoute() {
  return (
    <ContactPage
      linkComponent={Link}
      onSubmit={async (values) => {
        const response = await fetch("/api/contact", {
          method: "POST",
          headers: { "Content-Type": "application/json" },
          body: JSON.stringify(values),
        })
        if (!response.ok) throw new Error("Could not send")
      }}
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `design?` | `"classic" \| "minimal" \| "bold"` | `"classic"` | The whole page's look. classic: the layout prop, a soft glow, the form and channels on raised cards; minimal: a soft backdrop, a transparent header, no cards, the form right on the page beside a plain channel list, no band, a feature-light FAQ and a simple footer; bold: a solid header, huge heavy type on a grid with gradient bands, the channels and hours on a big inverted panel beside a floating form, logo tiles, an inverted selected office, FAQ cards and a wordmark footer. headerProps and footerProps still win. |
| `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 uses glow, minimal soft, bold grid; over plain the hero draws its own wash. |
| `backgroundColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint and glow color of the main background; defaults to the tone color when tone is not neutral. |
| `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. |
| `layout?` | `"split" \| "centered"` | `"split"` | split: the form left, channels and hours right (stacked on phones); centered: the channels in a row above a centered form. Applies to the classic design. |
| `topics?` | `ContactTopic[]` | `"CONTACT_TOPICS"` | { value, label, description?, icon? } topic cards of the form. |
| `companySizes?` | `ContactSizeOption[]` | `"CONTACT_COMPANY_SIZES"` | { value, label } options of the company size select; an empty array hides it. |
| `channels?` | `ContactChannel[]` | `"CONTACT_CHANNELS"` | { kind: email \| phone \| chat \| link, title, description?, value?, href?, icon? }; email and phone values get a copy button, chat shows Start a chat. |
| `hours?` | `ContactHours` | `"CONTACT_HOURS"` | { timeZone, days, open, close, label }: when someone answers; drives the Open now / Closed status. |
| `offices?` | `ContactOffice[]` | `"CONTACT_OFFICES"` | { city, country, address, timeZone, tag?, phone?, description? }: New York, London and Berlin. |
| `faq?` | `FaqItem[]` | `"CONTACT_FAQ"` | Questions of the short FAQ (FaqSection items). |
| `logos?` | `LogoCloudItem[]` | `"CONTACT_LOGOS"` | Customer wordmarks of the logo row. |
| `labels?` | `Partial<ContactPageLabels>` | `"DEFAULT_CONTACT_PAGE_LABELS"` | Every visible string, including the validation messages. |
| `defaultTopic?` | `string` | `"sales"` | The topic selected on load; "" makes the visitor pick one. |
| `requireWorkEmail?` | `boolean` | `false` | Rejects free mail domains like gmail.com or outlook.com. |
| `onSubmit?` | `(values: ContactFormValues) => (void \| Promise<unknown>)` |  | Sends { name, email, company, companySize, topic, message, consent }; a promise keeps the button loading, a rejection shows labels.failed. Without it the page waits 900 ms and confirms. |
| `onOpenChat?` | `() => void` |  | Runs on Start a chat (open your chat widget); without it the button links to chatHref. |
| `chatHref?` | `string` | `"/help"` | Where Start a chat goes when there is no onOpenChat. |
| `privacyHref?` | `string` | `"/legal/privacy"` | The privacy policy link under the form. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The selected topic card, the consent box, the selected office and the map pin. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | Send message; brand is the marketing orange. |
| `radius?` | `"none" \| "sm" \| "md" \| "lg" \| "full"` | `"md"` | Corners of the fields and topic cards (cards stop at lg). |
| `showChannels?` | `boolean` | `true` | The email, phone and chat channels. |
| `showHours?` | `boolean` | `true` | Office hours with the live open or closed status. |
| `showOffices?` | `boolean` | `true` | The offices band. |
| `showMap?` | `boolean` | `true` | The drawn map next to the offices; off shows the offices as a row of cards. |
| `showFaq?` | `boolean` | `true` | The short FAQ section built from faq. |
| `showLogos?` | `boolean` | `true` | The customer logo row under the form. |
| `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 heading, form and channels rise in once on mount; off in thumbnails and under reduced motion. |
| `locale?` | `string` | `"en-US"` | Intl locale for the local times and the opening hours (9 AM or 09:00). |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"<a>"` | The router link for the header, footer and inner links (next/link in an app). |
| `className?` | `string` |  | Classes for the root. |
| `classNames?` | `Partial<Record<ContactPageSlot, string>>` |  | Classes for header, hero, form, success, channels, hours, offices, map, faq, logos and footer. |

## Parts

### getContactOpenState (function)

getContactOpenState(hours, date?): { open, closesAt?, opensIn? } in the hours' time zone; what the Office hours status shows.

### CONTACT_PAGE_SAMPLE (constant)

All the sample content in one object: topics, companySizes, channels, hours, offices, faq and logos.

### CONTACT_TOPICS (constant)

Sales, Support, Partnerships and Press with lucide icons.

### CONTACT_COMPANY_SIZES (constant)

Five company size ranges.

### CONTACT_CHANNELS (constant)

sales@acme.com, support@acme.com, a New York phone number and live chat.

### CONTACT_HOURS (constant)

Monday to Friday, 9 AM to 6 PM in New York.

### CONTACT_OFFICES (constant)

New York (headquarters), London and Berlin.

### CONTACT_FAQ (constant)

Four questions people ask before writing.

### CONTACT_LOGOS (constant)

The customer wordmarks (LOGO_CLOUD_SAMPLE).

### DEFAULT_CONTACT_PAGE_LABELS (constant)

The English strings.

### CONTACT_PAGE_DESIGNS (constant)

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

### ContactPageDesign (type)

"classic" | "minimal" | "bold".

### ContactPageProps (type)

Props of ContactPage.

### ContactFormValues (type)

{ name, email, company, companySize, topic, message, consent }: what onSubmit receives.

### ContactChannel (type)

One way to reach the team.

### ContactOffice (type)

One office with its address and time zone.

## Examples

- **Minimal design**: design="minimal": a transparent header, the form right on the page beside a plain channel list, no cards or band, on a soft backdrop.
- **Bold design**: design="bold": huge heavy type on a grid, the channels and hours on a big inverted panel beside a floating form.
- **Centered with brand actions**: layout centered: the channels in a row above a centered form; tone and ctaTone brand; Start a chat runs onOpenChat.
- **Support first, work email required**: Starts on Support with work emails required (try a gmail.com address), offices as a row of cards without the map.
- **Inside a site layout**: No header, footer, offices or logos: the form, the channels and the FAQ.
- **When sending fails**: onSubmit rejects: after the spinner the form keeps everything and shows the error above Send message.

## See also

- [FAQ Section](https://wingo-ui.com/components/faq-section) ([Markdown](https://wingo-ui.com/components/faq-section.md))
- [Logo Cloud](https://wingo-ui.com/components/logo-cloud) ([Markdown](https://wingo-ui.com/components/logo-cloud.md))
- [Radio Group](https://wingo-ui.com/components/radio-group) ([Markdown](https://wingo-ui.com/components/radio-group.md))
- [Copy Button](https://wingo-ui.com/components/copy-button) ([Markdown](https://wingo-ui.com/components/copy-button.md))
- [Textarea](https://wingo-ui.com/components/textarea) ([Markdown](https://wingo-ui.com/components/textarea.md))

---

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