Victor Mesquita

Contact Section

Forms

About

A contact page section combining contact options, team availability status, and a message form with pending, success, and error states.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Contact Section to your project and fits it to your theme.

Code

How Contact Section is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import {
  ContactSection,
  ContactSectionAvailability,
  ContactSectionDescription,
  ContactSectionDetails,
  ContactSectionError,
  ContactSectionExpectation,
  ContactSectionExpectations,
  ContactSectionFields,
  ContactSectionForm,
  ContactSectionHeader,
  ContactSectionOption,
  ContactSectionOptionDetail,
  ContactSectionOptionIcon,
  ContactSectionOptionLink,
  ContactSectionOptions,
  ContactSectionOptionTitle,
  ContactSectionReset,
  ContactSectionSubmit,
  ContactSectionSuccess,
  ContactSectionTitle,
} from "@/components/ui/contact-section";

import {
  FormField,
  FormFieldInput,
  FormFieldLabel,
  FormFieldTextarea,
} from "@/components/ui/contact-section-utils/form-field";

import {
  StatusBannerDescription,
  StatusBannerTitle,
} from "@/components/ui/contact-section-utils/status-banner";

import { Headset, Mail, MessagesSquare } from "lucide-react";

async function send(data: FormData) {
  await new Promise((resolve) => setTimeout(resolve, 700));
  return String(data.get("email")).endsWith("@fail.test")
    ? ("error" as const)
    : ("success" as const);
}

export default function ContactSectionDemo() {
  return (
    <div className="w-full max-w-4xl mx-auto p-6 bg-background">
      <ContactSection variant="split">
        <ContactSectionDetails>
          <ContactSectionHeader>
            <ContactSectionTitle>Talk to the Ferrow team</ContactSectionTitle>
            <ContactSectionDescription>
              Questions about plans, migrations, or a tricky dispatch setup. A
              person reads every message.
            </ContactSectionDescription>
          </ContactSectionHeader>
          <ContactSectionAvailability available>
            Support is online now · Monday to Friday, 7:00–19:00 CET
          </ContactSectionAvailability>
          <ContactSectionOptions>
            <ContactSectionOption>
              <ContactSectionOptionIcon>
                <Mail size={14} />
              </ContactSectionOptionIcon>
              <ContactSectionOptionTitle>Email</ContactSectionOptionTitle>
              <ContactSectionOptionDetail>
                Replies within one business day
              </ContactSectionOptionDetail>
              <ContactSectionOptionLink href="mailto:hello@ferrow.example">
                hello@ferrow.example
              </ContactSectionOptionLink>
            </ContactSectionOption>
            <ContactSectionOption>
              <ContactSectionOptionIcon>
                <Headset size={14} />
              </ContactSectionOptionIcon>
              <ContactSectionOptionTitle>Phone</ContactSectionOptionTitle>
              <ContactSectionOptionDetail>
                For urgent outages
              </ContactSectionOptionDetail>
              <ContactSectionOptionLink href="tel:+15550134200">
                +1 555 013 4200
              </ContactSectionOptionLink>
            </ContactSectionOption>
            <ContactSectionOption>
              <ContactSectionOptionIcon>
                <MessagesSquare size={14} />
              </ContactSectionOptionIcon>
              <ContactSectionOptionTitle>Community</ContactSectionOptionTitle>
              <ContactSectionOptionDetail>
                Ask other dispatchers
              </ContactSectionOptionDetail>
              <ContactSectionOptionLink href="#community">
                Open the forum
              </ContactSectionOptionLink>
            </ContactSectionOption>
          </ContactSectionOptions>
        </ContactSectionDetails>
        <ContactSectionForm onSend={send} aria-label="Send the team a message">
          <ContactSectionFields>
            <FormField required>
              <FormFieldLabel>Name</FormFieldLabel>
              <FormFieldInput name="name" autoComplete="name" />
            </FormField>
            <FormField required>
              <FormFieldLabel>Work email</FormFieldLabel>
              <FormFieldInput name="email" type="email" autoComplete="email" />
            </FormField>
            <FormField required>
              <FormFieldLabel>How can we help?</FormFieldLabel>
              <FormFieldTextarea name="message" rows={4} />
            </FormField>
            <ContactSectionExpectations aria-label="What happens next">
              <ContactSectionExpectation>
                A support specialist replies by email.
              </ContactSectionExpectation>
              <ContactSectionExpectation>
                Use an address ending in @fail.test to preview the error state.
              </ContactSectionExpectation>
            </ContactSectionExpectations>
            <ContactSectionSubmit>Send message</ContactSectionSubmit>
          </ContactSectionFields>
          <ContactSectionError>
            <StatusBannerTitle>Your message wasn&apos;t sent</StatusBannerTitle>
            <StatusBannerDescription>
              Check your connection and try again. Your text is still in the
              form.
            </StatusBannerDescription>
          </ContactSectionError>
          <ContactSectionSuccess>
            <StatusBannerTitle>Message sent</StatusBannerTitle>
            <StatusBannerDescription>
              We&apos;ll reply within one business day. A copy is on its way to
              your inbox.
            </StatusBannerDescription>
          </ContactSectionSuccess>
          <ContactSectionReset>Send another message</ContactSectionReset>
        </ContactSectionForm>
      </ContactSection>
    </div>
  );
}

Dependencies

More by Victor Mesquita

View all
  • Data Table Toolbar

    Data Table Toolbar

    10
  • Uai Blocks Community Feed

    Uai Blocks Community Feed

    5
  • Cart Drawer

    Cart Drawer

  • App Sidebar

    App Sidebar

  • Filter Bar

    Filter Bar

  • Author Card

    Author Card

  • Audit Log

    Audit Log

  • Task List

    Task List

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19