---
title: "Contact Form · UI SDK — StyleX Blocks"
description: "Studio project inquiry form with response-time status, three value-proposition cards, validated contact and scope fields, multi-select topic toggles, team-size and budget selects, referral attribution, and a structured submission confirmation view."
url: "https://stylexblocks.com/block/ui-sdk/contact-form/"
agent:
  instructions: "Use this search API to find relevant components and blocks across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://stylexblocks.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Contact Form block

Studio project inquiry form with response-time status, three value-proposition cards, validated contact and scope fields, multi-select topic toggles, team-size and budget selects, referral attribution, and a structured submission confirmation view.

- Behavior engine: UI SDK
- Category: [Forms](https://stylexblocks.com/blocks/forms.md)
- Built with: [Alert](https://stylexblocks.com/components/ui-sdk/alert.md), [Badge](https://stylexblocks.com/components/ui-sdk/badge.md), [Button](https://stylexblocks.com/components/ui-sdk/button.md), [Card](https://stylexblocks.com/components/ui-sdk/card.md), [Checkbox](https://stylexblocks.com/components/ui-sdk/checkbox.md), [Data List](https://stylexblocks.com/components/ui-sdk/data-list.md), [Field](https://stylexblocks.com/components/ui-sdk/field.md), [Fieldset](https://stylexblocks.com/components/ui-sdk/fieldset.md), [Grid](https://stylexblocks.com/components/ui-sdk/grid.md), [Heading](https://stylexblocks.com/components/ui-sdk/heading.md), [Icon](https://stylexblocks.com/components/ui-sdk/icon.md), [Icon Badge](https://stylexblocks.com/components/ui-sdk/icon-badge.md), [Input](https://stylexblocks.com/components/ui-sdk/input.md), [Link](https://stylexblocks.com/components/ui-sdk/link.md), [Radio Group](https://stylexblocks.com/components/ui-sdk/radio-group.md), [Select](https://stylexblocks.com/components/ui-sdk/select.md), [Separator](https://stylexblocks.com/components/ui-sdk/separator.md), [Stack](https://stylexblocks.com/components/ui-sdk/stack.md), [Status](https://stylexblocks.com/components/ui-sdk/status.md), [Text](https://stylexblocks.com/components/ui-sdk/text.md), [Textarea](https://stylexblocks.com/components/ui-sdk/textarea.md), [Toast](https://stylexblocks.com/components/ui-sdk/toast.md), [Toggle Group](https://stylexblocks.com/components/ui-sdk/toggle-group.md)
- HTML page: https://stylexblocks.com/block/ui-sdk/contact-form/

## Install

Configure the project once (sets the behavior engine and import aliases):

```sh
npx stylexblocks init --style ui-sdk
```

Then add the item as source you own:

```sh
npx stylexblocks add contact-form
```

Equivalent: `npx shadcn add @stylexblocks/contact-form`. Registry item JSON: https://stylexblocks.com/r/ui-sdk/contact-form.json

## Usage

```tsx
import { ContactForm } from "#components/blocks/ui-sdk/contact-form.tsx";

export function Example() {
  return (
    <div style={{ minHeight: "100dvh" }}>
      <ContactForm />
    </div>
  );
}
```

## Source

`components/blocks/ui-sdk/contact-form.tsx`

```tsx
import * as stylex from "@stylexjs/stylex";
import { useCallback, useMemo, useState } from "react";
import { Alert } from "#components/ui/ui-sdk/alert.tsx";
import { Badge } from "#components/ui/ui-sdk/badge.tsx";
import { Button } from "#components/ui/ui-sdk/button.tsx";
import { Card } from "#components/ui/ui-sdk/card.tsx";
import { Checkbox } from "#components/ui/ui-sdk/checkbox.tsx";
import { DataList } from "#components/ui/ui-sdk/data-list.tsx";
import { Field } from "#components/ui/ui-sdk/field.tsx";
import { Fieldset } from "#components/ui/ui-sdk/fieldset.tsx";
import { Grid } from "#components/ui/ui-sdk/grid.tsx";
import { Heading } from "#components/ui/ui-sdk/heading.tsx";
import { Icon } from "#components/ui/ui-sdk/icon.tsx";
import { IconBadge } from "#components/ui/ui-sdk/icon-badge.tsx";
import { Input } from "#components/ui/ui-sdk/input.tsx";
import { Link } from "#components/ui/ui-sdk/link.tsx";
import { RadioGroup } from "#components/ui/ui-sdk/radio-group.tsx";
import { Select } from "#components/ui/ui-sdk/select.tsx";
import { Separator } from "#components/ui/ui-sdk/separator.tsx";
import { HStack, VStack } from "#components/ui/ui-sdk/stack.tsx";
import { Status } from "#components/ui/ui-sdk/status.tsx";
import { Text } from "#components/ui/ui-sdk/text.tsx";
import { Textarea } from "#components/ui/ui-sdk/textarea.tsx";
import { Toast, Toaster } from "#components/ui/ui-sdk/toast.tsx";
import { ToggleGroup } from "#components/ui/ui-sdk/toggle-group.tsx";
import { semanticColors } from "@stylexblocks/ui/semantic-tokens/colors.stylex.ts";
import {
  accentPalette,
  emeraldPalette,
  redPalette,
} from "@stylexblocks/ui/themes/palettes.ts";
import { fonts } from "@stylexblocks/ui/tokens/fonts.stylex.ts";
import { lineHeights } from "@stylexblocks/ui/tokens/line-heights.stylex.ts";
import { spacing } from "@stylexblocks/ui/tokens/spacing.stylex.ts";
import type { StyleOverrideProps } from "#lib/recipe-props.ts";

// ── Types ─────────────────────────────────────────────────────────────────────

export type ContactHighlightIcon = "bolt" | "layers" | "clock";

export interface ContactHighlight {
  id: string;
  icon: ContactHighlightIcon;
  title: string;
  description: string;
}

export interface ContactOption {
  value: string;
  label: string;
}

interface ContactFormErrors {
  fullName?: string;
  email?: string;
  company?: string;
  topics?: string;
  teamSize?: string;
  timeline?: string;
  budget?: string;
}

export interface ContactInquiryPayload {
  referenceId: string;
  fullName: string;
  email: string;
  company: string;
  role: string;
  topics: string[];
  teamSize: string;
  timeline: string;
  budget: string;
  referralSource: string;
  message: string;
  isDecisionMaker: boolean;
  requestNda: boolean;
}

export interface ContactFormProps extends StyleOverrideProps {
  /** Studio or brand eyebrow label displayed above the headline. */
  eyebrow?: string;
  /** Primary display headline. */
  title?: string;
  /** Supporting subtitle beneath the headline. */
  description?: string;
  /** Response-time SLA note displayed in the header and submit footer. */
  responseSla?: string;
  /** Three-column studio highlight cards rendered above the inquiry form. */
  highlights?: ContactHighlight[];
  /** Multi-select focus areas for the project scope section. */
  topicOptions?: ContactOption[];
  /** Engineering and design team size options. */
  teamSizeOptions?: ContactOption[];
  /** Target kickoff window options. */
  timelineOptions?: ContactOption[];
  /** Estimated engagement budget ranges. */
  budgetOptions?: ContactOption[];
  /** Referral attribution options rendered in the radio group. */
  referralOptions?: ContactOption[];
  /** Called with the validated inquiry payload when the form is submitted. */
  onSubmitInquiry?: (payload: ContactInquiryPayload) => void;
}

// ── Demo Data & Constants ─────────────────────────────────────────────────────

const DEFAULT_HIGHLIGHTS: ContactHighlight[] = [
  {
    id: "principal-led",
    icon: "bolt",
    title: "Principal-led delivery",
    description:
      "Senior design systems engineers and product designers work directly in your codebase from day one.",
  },
  {
    id: "built-for-stack",
    icon: "layers",
    title: "Tailored to your stack",
    description:
      "Token architecture, accessible primitives, and CI guardrails shaped around how your teams ship.",
  },
  {
    id: "fast-response",
    icon: "clock",
    title: "Partner reply in 24h",
    description:
      "Every brief is reviewed directly by our founding partners — no sales handoffs or intake queues.",
  },
];

const DEFAULT_TOPIC_OPTIONS: ContactOption[] = [
  { value: "design-system", label: "Design System Architecture" },
  { value: "component-library", label: "Component Library" },
  { value: "tokens-theming", label: "Tokens & Multi-Brand Theming" },
  { value: "product-ui", label: "Product UI Engineering" },
  { value: "accessibility", label: "Accessibility Audit (WCAG)" },
  { value: "frontend-migration", label: "Frontend Platform Migration" },
  { value: "prototyping", label: "Interactive Prototyping" },
  { value: "advisory", label: "Advisory & Team Training" },
];

const DEFAULT_TEAM_SIZE_OPTIONS: ContactOption[] = [
  { value: "1-10", label: "1–10 product & engineering" },
  { value: "11-50", label: "11–50 product & engineering" },
  { value: "51-250", label: "51–250 product & engineering" },
  { value: "250+", label: "250+ (multi-org platform)" },
];

const DEFAULT_TIMELINE_OPTIONS: ContactOption[] = [
  { value: "immediate", label: "Immediate (within 2 weeks)" },
  { value: "1-2-months", label: "Next 1–2 months" },
  { value: "next-quarter", label: "Next quarter (3–6 months)" },
  { value: "exploring", label: "Exploring for later this year" },
];

const DEFAULT_BUDGET_OPTIONS: ContactOption[] = [
  { value: "15k-30k", label: "$15k – $30k · Audit or focused sprint" },
  { value: "30k-75k", label: "$30k – $75k · Core design system" },
  { value: "75k-150k", label: "$75k – $150k · Full platform & migration" },
  { value: "150k+", label: "$150k+ · Multi-quarter embedded partnership" },
  { value: "scoping", label: "Not finalized — help us scope" },
];

const DEFAULT_REFERRAL_OPTIONS: ContactOption[] = [
  { value: "referral", label: "Colleague or founder referral" },
  { value: "writing", label: "Open-source or engineering writing" },
  { value: "conference", label: "Conference talk or workshop" },
  { value: "search", label: "Search or studio directory" },
  { value: "other", label: "Other" },
];

const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

// ── Inline Icons ──────────────────────────────────────────────────────────────

function HighlightGlyph({ kind }: { kind: ContactHighlightIcon }) {
  if (kind === "bolt") {
    return (
      <Icon
        size="md"
        viewBox="0 0 24 24"
        fill="none"
        stroke="currentColor"
        strokeWidth="1.75"
        strokeLinecap="round"
        strokeLinejoin="round"
        aria-hidden="true"
      >
        <path d="M13 2 4.5 13.5h6.5L10 22l9.5-12H13V2Z" />
      </Icon>
    );
  }
  if (kind === "layers") {
    return (
      <Icon
        size="md"
        viewBox="0 0 24 24"
        fill="none"
        stroke="currentColor"
        strokeWidth="1.75"
        strokeLinecap="round"
        strokeLinejoin="round"
        aria-hidden="true"
      >
        <path d="m12 3 9 4.5-9 4.5-9-4.5L12 3Z" />
        <path d="m3 12 9 4.5 9-4.5" />
        <path d="m3 16.5 9 4.5 9-4.5" />
      </Icon>
    );
  }
  return (
    <Icon
      size="md"
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth="1.75"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <circle cx="12" cy="12" r="9" />
      <path d="M12 7v5l3.5 2" />
    </Icon>
  );
}

function CheckIcon() {
  return (
    <Icon
      size="xs"
      viewBox="0 0 16 16"
      fill="none"
      stroke="currentColor"
      strokeWidth="2"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <path d="m3.5 8.5 3 3 6-7" />
    </Icon>
  );
}

function AlertCircleIcon() {
  return (
    <Icon
      size="inherit"
      viewBox="0 0 20 20"
      fill="none"
      stroke="currentColor"
      strokeWidth="1.75"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <circle cx="10" cy="10" r="8" />
      <path d="M10 6.5v4" />
      <circle cx="10" cy="13.5" r="0.6" fill="currentColor" stroke="none" />
    </Icon>
  );
}

function CheckCircleIcon() {
  return (
    <Icon
      size="inherit"
      viewBox="0 0 20 20"
      fill="none"
      stroke="currentColor"
      strokeWidth="1.75"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <circle cx="10" cy="10" r="8" />
      <path d="m6.75 10.25 2.25 2.25 4.5-4.75" />
    </Icon>
  );
}

function ArrowRightIcon() {
  return (
    <Icon
      size="sm"
      viewBox="0 0 20 20"
      fill="none"
      stroke="currentColor"
      strokeWidth="1.75"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <path d="M4.5 10h11" />
      <path d="M11 5.5 15.5 10 11 14.5" />
    </Icon>
  );
}

// ── Styles ────────────────────────────────────────────────────────────────────

const styles = stylex.create({
  root: {
    backgroundColor: semanticColors.bg,
    color: semanticColors.fg,
    fontFamily: fonts.body,
    minHeight: "100%",
    overflowY: "auto",
    paddingBlock: {
      default: spacing._12,
      "@media (max-width: 640px)": spacing._8,
    },
    paddingInline: {
      default: spacing._6,
      "@media (max-width: 640px)": spacing._4,
    },
    width: "100%",
  },
  content: {
    maxWidth: "50rem",
    width: "100%",
  },
  header: {
    textAlign: "center",
  },
  headline: {
    marginBlock: 0,
    maxWidth: "20ch",
    textAlign: "center",
    textWrap: "balance",
  },
  description: {
    maxWidth: "56ch",
    textWrap: "balance",
  },
  highlightsGrid: {
    gridTemplateColumns: {
      default: "repeat(3, minmax(0, 1fr))",
      "@media (max-width: 720px)": "1fr",
    },
  },
  highlightBody: {
    gap: spacing._3,
  },
  cardTitleReset: {
    marginBlock: 0,
  },
  cardDescriptionReset: {
    lineHeight: lineHeights.sm,
    marginBlock: 0,
  },
  cardBodyGap: {
    gap: spacing._6,
  },
  sectionHeading: {
    marginBlock: 0,
  },
  gridTwo: {
    gridTemplateColumns: {
      default: "repeat(2, minmax(0, 1fr))",
      "@media (max-width: 600px)": "1fr",
    },
  },
  labelRow: {
    gap: spacing._2,
    justifyContent: "space-between",
    width: "100%",
  },
  fullWidth: {
    width: "100%",
  },
  requiredStar: {
    lineHeight: 1,
  },
  topicGroup: {
    display: "flex",
    flexWrap: "wrap",
    gap: spacing._2,
    justifyContent: "flex-start",
    width: "100%",
  },
  topicItem: {
    paddingInline: spacing._3,
  },
  radioGrid: {
    display: "grid",
    gap: spacing._2_5,
    gridTemplateColumns: {
      default: "repeat(2, minmax(0, 1fr))",
      "@media (max-width: 560px)": "1fr",
    },
  },
  textarea: {
    minHeight: "6.5rem",
    resize: "vertical",
  },
  legalText: {
    lineHeight: lineHeights.sm,
  },
  confirmationMessage: {
    whiteSpace: "pre-wrap",
  },
});

// ── Component ─────────────────────────────────────────────────────────────────

/**
 * ContactForm — studio project inquiry form pairing a centered editorial
 * header, three value-proposition cards, validated contact & scope fields,
 * multi-select topic chips, referral attribution, and a structured submission
 * confirmation summary.
 */
export function ContactForm({
  eyebrow = "Northline Studio · Product Engineering & Design Systems",
  title = "Tell us what you're building",
  description = "We partner with product and platform teams to architect design systems, ship accessible component libraries, and modernize frontend foundations.",
  responseSla = "Partners reply within 1 business day (Mon–Fri, CET & EST)",
  highlights = DEFAULT_HIGHLIGHTS,
  topicOptions = DEFAULT_TOPIC_OPTIONS,
  teamSizeOptions = DEFAULT_TEAM_SIZE_OPTIONS,
  timelineOptions = DEFAULT_TIMELINE_OPTIONS,
  budgetOptions = DEFAULT_BUDGET_OPTIONS,
  referralOptions = DEFAULT_REFERRAL_OPTIONS,
  onSubmitInquiry,
  palette,
  style,
}: ContactFormProps) {
  const queue = useMemo(() => Toast.createToaster(), []);

  const [fullName, setFullName] = useState("");
  const [email, setEmail] = useState("");
  const [company, setCompany] = useState("");
  const [role, setRole] = useState("");
  const [topics, setTopics] = useState<string[]>([]);
  const [teamSize, setTeamSize] = useState("");
  const [timeline, setTimeline] = useState("");
  const [budget, setBudget] = useState("");
  const [referralSource, setReferralSource] = useState("");
  const [message, setMessage] = useState("");
  const [isDecisionMaker, setIsDecisionMaker] = useState(false);
  const [requestNda, setRequestNda] = useState(false);

  const [attemptedSubmit, setAttemptedSubmit] = useState(false);
  const [confirmation, setConfirmation] = useState<ContactInquiryPayload | null>(null);
  const [submissionSeq, setSubmissionSeq] = useState(1042);

  const validate = useCallback((): ContactFormErrors => {
    const trimmedEmail = email.trim();
    return {
      fullName: !fullName.trim() ? "Enter your full name." : undefined,
      email: !trimmedEmail
        ? "Enter your work email."
        : !EMAIL_PATTERN.test(trimmedEmail)
          ? "Enter a valid email address."
          : undefined,
      company: !company.trim() ? "Enter your company or organization." : undefined,
      topics:
        topics.length === 0
          ? "Select at least one focus area so we can route your inquiry."
          : undefined,
      teamSize: !teamSize ? "Select your team size." : undefined,
      timeline: !timeline ? "Choose a target kickoff window." : undefined,
      budget: !budget ? "Select an estimated budget range." : undefined,
    };
  }, [budget, company, email, fullName, teamSize, timeline, topics]);

  const errors: ContactFormErrors = attemptedSubmit ? validate() : {};
  const errorCount = Object.values(errors).filter(Boolean).length;

  const lookupLabel = useCallback(
    (options: ContactOption[], value: string) =>
      options.find((opt) => opt.value === value)?.label ?? value,
    [],
  );

  const handleSubmit = useCallback(
    (event: React.FormEvent<HTMLFormElement>) => {
      event.preventDefault();
      setAttemptedSubmit(true);

      const currentErrors = validate();
      const missingCount = Object.values(currentErrors).filter(Boolean).length;
      if (missingCount > 0) {
        queue.error("Please review the required fields", {
          description:
            missingCount === 1
              ? "1 required field still needs your attention."
              : `${missingCount} required fields still need your attention.`,
        });
        return;
      }

      const nextSeq = submissionSeq + 1;
      setSubmissionSeq(nextSeq);
      const payload: ContactInquiryPayload = {
        referenceId: `NL-${nextSeq}`,
        fullName: fullName.trim(),
        email: email.trim(),
        company: company.trim(),
        role: role.trim(),
        topics,
        teamSize,
        timeline,
        budget,
        referralSource,
        message: message.trim(),
        isDecisionMaker,
        requestNda,
      };

      onSubmitInquiry?.(payload);
      setConfirmation(payload);
      queue.success("Inquiry sent to Northline Studio", {
        description: `Reference ${payload.referenceId} — expect a partner reply within 1 business day.`,
      });
    },
    [
      budget,
      company,
      email,
      fullName,
      isDecisionMaker,
      message,
      onSubmitInquiry,
      queue,
      referralSource,
      requestNda,
      role,
      submissionSeq,
      teamSize,
      timeline,
      topics,
      validate,
    ],
  );

  const handleReset = useCallback(() => {
    setFullName("");
    setEmail("");
    setCompany("");
    setRole("");
    setTopics([]);
    setTeamSize("");
    setTimeline("");
    setBudget("");
    setReferralSource("");
    setMessage("");
    setIsDecisionMaker(false);
    setRequestNda(false);
    setAttemptedSubmit(false);
    setConfirmation(null);
  }, []);

  const handlePrivacyClick = useCallback(
    (event: React.MouseEvent<HTMLAnchorElement>) => {
      event.preventDefault();
      queue.info("Northline Studio Privacy Policy", {
        description:
          "Inquiry details are used solely to scope your project and are never shared with third parties.",
      });
    },
    [queue],
  );

  return (
    <VStack align="center" gap="0" palette={palette} style={[styles.root, style]}>
      <VStack render={<main />} gap="8" style={styles.content}>
        {/* Header */}
        <VStack render={<header />} align="center" gap="3" style={styles.header}>
          {eyebrow ? (
            <Badge variant="subtle" size="md" palette={accentPalette}>
              {eyebrow}
            </Badge>
          ) : null}
          <Heading render={<h1 />} size="4xl" style={styles.headline}>
            {title}
          </Heading>
          <Text variant="muted" size="md" align="center" style={styles.description}>
            {description}
          </Text>
          <Status.Root size="sm" palette={emeraldPalette}>
            <Status.Indicator />
            <Text render={<span />} size="xs" tone="muted">
              {responseSla}
            </Text>
          </Status.Root>
        </VStack>

        {/* Value-proposition cards */}
        <section aria-label="Why teams work with Northline Studio">
          <Grid columns="3" gap="4" style={styles.highlightsGrid}>
            {highlights.map((item) => (
              <Card.Root key={item.id} variant="outline" size="md">
                <Card.Body style={styles.highlightBody}>
                  <IconBadge variant="subtle" size="md" palette={accentPalette}>
                    <HighlightGlyph kind={item.icon} />
                  </IconBadge>
                  <VStack gap="1">
                    <Card.Title style={styles.cardTitleReset}>{item.title}</Card.Title>
                    <Card.Description style={styles.cardDescriptionReset}>
                      {item.description}
                    </Card.Description>
                  </VStack>
                </Card.Body>
              </Card.Root>
            ))}
          </Grid>
        </section>

        {/* Confirmation or Inquiry Form */}
        {confirmation ? (
          <Card.Root variant="outline" size="lg">
            <Card.Body style={styles.cardBodyGap}>
              <Alert.Root status="success" variant="subtle" size="md" palette={emeraldPalette}>
                <Alert.Indicator>
                  <CheckCircleIcon />
                </Alert.Indicator>
                <Alert.Content>
                  <Alert.Title>
                    Inquiry received · Reference{" "}
                    <Text render={<span />} variant="mono" tone="accent" weight="medium">
                      {confirmation.referenceId}
                    </Text>
                  </Alert.Title>
                  <Alert.Description>
                    Thanks, {confirmation.fullName}. We sent a copy to{" "}
                    <strong>{confirmation.email}</strong> and a founding partner will follow up
                    within 1 business day with intro call times.
                  </Alert.Description>
                </Alert.Content>
              </Alert.Root>

              <DataList.Root orientation="horizontal" size="md">
                <DataList.Item>
                  <DataList.ItemLabel>Contact</DataList.ItemLabel>
                  <DataList.ItemValue>
                    {confirmation.fullName}
                    {confirmation.role ? ` · ${confirmation.role}` : ""}
                  </DataList.ItemValue>
                </DataList.Item>
                <DataList.Item>
                  <DataList.ItemLabel>Company</DataList.ItemLabel>
                  <DataList.ItemValue>{confirmation.company}</DataList.ItemValue>
                </DataList.Item>
                <DataList.Item>
                  <DataList.ItemLabel>Focus areas</DataList.ItemLabel>
                  <DataList.ItemValue>
                    <HStack wrap="wrap" gap="1.5">
                      {confirmation.topics.map((topicValue) => (
                        <Badge
                          key={topicValue}
                          variant="subtle"
                          size="sm"
                          palette={accentPalette}
                        >
                          {lookupLabel(topicOptions, topicValue)}
                        </Badge>
                      ))}
                    </HStack>
                  </DataList.ItemValue>
                </DataList.Item>
                <DataList.Item>
                  <DataList.ItemLabel>Team size</DataList.ItemLabel>
                  <DataList.ItemValue>
                    {lookupLabel(teamSizeOptions, confirmation.teamSize)}
                  </DataList.ItemValue>
                </DataList.Item>
                <DataList.Item>
                  <DataList.ItemLabel>Target kickoff</DataList.ItemLabel>
                  <DataList.ItemValue>
                    {lookupLabel(timelineOptions, confirmation.timeline)}
                  </DataList.ItemValue>
                </DataList.Item>
                <DataList.Item>
                  <DataList.ItemLabel>Estimated budget</DataList.ItemLabel>
                  <DataList.ItemValue>
                    {lookupLabel(budgetOptions, confirmation.budget)}
                  </DataList.ItemValue>
                </DataList.Item>
                {confirmation.referralSource ? (
                  <DataList.Item>
                    <DataList.ItemLabel>Source</DataList.ItemLabel>
                    <DataList.ItemValue>
                      {lookupLabel(referralOptions, confirmation.referralSource)}
                    </DataList.ItemValue>
                  </DataList.Item>
                ) : null}
                <DataList.Item>
                  <DataList.ItemLabel>Preferences</DataList.ItemLabel>
                  <DataList.ItemValue>
                    {[
                      confirmation.isDecisionMaker ? "Primary budget stakeholder" : null,
                      confirmation.requestNda ? "Mutual NDA requested before intro call" : null,
                    ]
                      .filter(Boolean)
                      .join(" · ") || "Standard intro call"}
                  </DataList.ItemValue>
                </DataList.Item>
                {confirmation.message ? (
                  <DataList.Item>
                    <DataList.ItemLabel>Project brief</DataList.ItemLabel>
                    <DataList.ItemValue>
                      <Text style={styles.confirmationMessage}>{confirmation.message}</Text>
                    </DataList.ItemValue>
                  </DataList.Item>
                ) : null}
              </DataList.Root>

              <Separator decorative />

              <HStack wrap="wrap" justify="end" gap="3">
                <Button
                  type="button"
                  variant="surface"
                  size="md"
                  onClick={() => setConfirmation(null)}
                >
                  Edit inquiry
                </Button>
                <Button
                  type="button"
                  variant="solid"
                  size="md"
                  palette={accentPalette}
                  onClick={handleReset}
                >
                  Start another inquiry
                </Button>
              </HStack>
            </Card.Body>
          </Card.Root>
        ) : (
          <Card.Root variant="outline" size="lg">
            <Card.Body style={styles.cardBodyGap}>
              <VStack render={<form noValidate onSubmit={handleSubmit} />} gap="6">
                {/* Section 1: Contact details */}
                <VStack
                  render={<section aria-labelledby="contact-details-heading" />}
                  gap="5"
                >
                  <VStack gap="1">
                    <Heading
                      id="contact-details-heading"
                      size="lg"
                      style={styles.sectionHeading}
                    >
                      Your details
                    </Heading>
                    <Text variant="muted" size="sm">
                      Who should our partners follow up with about this project?
                    </Text>
                  </VStack>

                  <Grid columns="2" gap="4" style={styles.gridTwo}>
                    <Field.Root required invalid={Boolean(errors.fullName)}>
                      <Field.Label>
                        Full name
                        <Field.RequiredIndicator />
                      </Field.Label>
                      <Input
                        autoComplete="name"
                        placeholder="Maya Lin"
                        value={fullName}
                        onValueChange={setFullName}
                      />
                      {errors.fullName ? (
                        <Field.Error match>{errors.fullName}</Field.Error>
                      ) : null}
                    </Field.Root>

                    <Field.Root required invalid={Boolean(errors.email)}>
                      <Field.Label>
                        Work email
                        <Field.RequiredIndicator />
                      </Field.Label>
                      <Input
                        type="email"
                        autoComplete="email"
                        placeholder="maya@helio.dev"
                        value={email}
                        onValueChange={setEmail}
                      />
                      {errors.email ? <Field.Error match>{errors.email}</Field.Error> : null}
                    </Field.Root>
                  </Grid>

                  <Grid columns="2" gap="4" style={styles.gridTwo}>
                    <Field.Root required invalid={Boolean(errors.company)}>
                      <Field.Label>
                        Company
                        <Field.RequiredIndicator />
                      </Field.Label>
                      <Input
                        autoComplete="organization"
                        placeholder="Helio Systems"
                        value={company}
                        onValueChange={setCompany}
                      />
                      {errors.company ? (
                        <Field.Error match>{errors.company}</Field.Error>
                      ) : null}
                    </Field.Root>

                    <Field.Root>
                      <Field.Label style={styles.labelRow}>
                        <span>Role or title</span>
                        <Text render={<span />} size="xs" tone="subtle" weight="normal">
                          Optional
                        </Text>
                      </Field.Label>
                      <Input
                        autoComplete="organization-title"
                        placeholder="Head of Design, Staff Frontend…"
                        value={role}
                        onValueChange={setRole}
                      />
                    </Field.Root>
                  </Grid>
                </VStack>

                <Separator decorative />

                {/* Section 2: Project scope */}
                <VStack
                  render={<section aria-labelledby="project-scope-heading" />}
                  gap="5"
                >
                  <VStack gap="1">
                    <Heading id="project-scope-heading" size="lg" style={styles.sectionHeading}>
                      Project scope
                    </Heading>
                    <Text variant="muted" size="sm">
                      Help us understand what you want to ship and where your team is today.
                    </Text>
                  </VStack>

                  {/* Multi-select focus areas */}
                  <VStack gap="2.5">
                    <HStack justify="between" gap="2" style={styles.fullWidth}>
                      <HStack render={<span id="contact-topics-label" />} gap="1">
                        <Text render={<span />} variant="label" size="sm">
                          What can we help you build?
                        </Text>
                        <Text
                          render={<span />}
                          size="sm"
                          tone="error"
                          style={styles.requiredStar}
                          aria-hidden="true"
                        >
                          *
                        </Text>
                      </HStack>
                      <Text render={<span />} size="xs" tone="subtle" weight="normal">
                        {topics.length > 0
                          ? `${topics.length} selected`
                          : "Select one or more"}
                      </Text>
                    </HStack>

                    <ToggleGroup.Root
                      multiple
                      variant="outline"
                      size="sm"
                      palette={accentPalette}
                      value={topics}
                      onValueChange={setTopics}
                      aria-labelledby="contact-topics-label"
                      style={styles.topicGroup}
                    >
                      {topicOptions.map((topic) => {
                        const isSelected = topics.includes(topic.value);
                        return (
                          <ToggleGroup.Item
                            key={topic.value}
                            value={topic.value}
                            style={styles.topicItem}
                          >
                            {isSelected ? <CheckIcon /> : null}
                            {topic.label}
                          </ToggleGroup.Item>
                        );
                      })}
                    </ToggleGroup.Root>

                    {errors.topics ? (
                      <Alert.Root
                        status="error"
                        variant="subtle"
                        size="sm"
                        palette={redPalette}
                      >
                        <Alert.Indicator>
                          <AlertCircleIcon />
                        </Alert.Indicator>
                        <Alert.Content>
                          <Alert.Title>{errors.topics}</Alert.Title>
                        </Alert.Content>
                      </Alert.Root>
                    ) : null}
                  </VStack>

                  {/* Team size & kickoff timeline */}
                  <Grid columns="2" gap="4" style={styles.gridTwo}>
                    <Field.Root required invalid={Boolean(errors.teamSize)}>
                      <Field.Label>
                        Team size
                        <Field.RequiredIndicator />
                      </Field.Label>
                      <Select.Root
                        items={teamSizeOptions}
                        value={teamSize || null}
                        onValueChange={(next) => setTeamSize(next ?? "")}
                        style={styles.fullWidth}
                      >
                        <Select.Control>
                          <Select.Trigger>
                            <Select.Value placeholder="Select team size" />
                          </Select.Trigger>
                          <Select.IndicatorGroup>
                            <Select.Icon />
                          </Select.IndicatorGroup>
                        </Select.Control>
                        <Select.Content>
                          {teamSizeOptions.map((option) => (
                            <Select.Item key={option.value} value={option.value}>
                              <Select.ItemText>{option.label}</Select.ItemText>
                              <Select.ItemIndicator />
                            </Select.Item>
                          ))}
                        </Select.Content>
                      </Select.Root>
                      {errors.teamSize ? (
                        <Field.Error match>{errors.teamSize}</Field.Error>
                      ) : null}
                    </Field.Root>

                    <Field.Root required invalid={Boolean(errors.timeline)}>
                      <Field.Label>
                        Target kickoff
                        <Field.RequiredIndicator />
                      </Field.Label>
                      <Select.Root
                        items={timelineOptions}
                        value={timeline || null}
                        onValueChange={(next) => setTimeline(next ?? "")}
                        style={styles.fullWidth}
                      >
                        <Select.Control>
                          <Select.Trigger>
                            <Select.Value placeholder="When are you aiming to start?" />
                          </Select.Trigger>
                          <Select.IndicatorGroup>
                            <Select.Icon />
                          </Select.IndicatorGroup>
                        </Select.Control>
                        <Select.Content>
                          {timelineOptions.map((option) => (
                            <Select.Item key={option.value} value={option.value}>
                              <Select.ItemText>{option.label}</Select.ItemText>
                              <Select.ItemIndicator />
                            </Select.Item>
                          ))}
                        </Select.Content>
                      </Select.Root>
                      {errors.timeline ? (
                        <Field.Error match>{errors.timeline}</Field.Error>
                      ) : null}
                    </Field.Root>
                  </Grid>

                  {/* Estimated budget */}
                  <Field.Root required invalid={Boolean(errors.budget)}>
                    <Field.Label>
                      Estimated budget
                      <Field.RequiredIndicator />
                    </Field.Label>
                    <Select.Root
                      items={budgetOptions}
                      value={budget || null}
                      onValueChange={(next) => setBudget(next ?? "")}
                      style={styles.fullWidth}
                    >
                      <Select.Control>
                        <Select.Trigger>
                          <Select.Value placeholder="Select an engagement range" />
                        </Select.Trigger>
                        <Select.IndicatorGroup>
                          <Select.Icon />
                        </Select.IndicatorGroup>
                      </Select.Control>
                      <Select.Content>
                        {budgetOptions.map((option) => (
                          <Select.Item key={option.value} value={option.value}>
                            <Select.ItemText>{option.label}</Select.ItemText>
                            <Select.ItemIndicator />
                          </Select.Item>
                        ))}
                      </Select.Content>
                    </Select.Root>
                    {errors.budget ? <Field.Error match>{errors.budget}</Field.Error> : null}
                  </Field.Root>

                  {/* Referral source */}
                  <Fieldset.Root size="sm">
                    <Fieldset.Legend>How did you hear about Northline?</Fieldset.Legend>
                    <Fieldset.Content>
                      <RadioGroup.Root
                        value={referralSource || undefined}
                        onValueChange={setReferralSource}
                        palette={accentPalette}
                        aria-label="How did you hear about Northline?"
                        style={styles.radioGrid}
                      >
                        {referralOptions.map((option) => (
                          <RadioGroup.Item key={option.value}>
                            <RadioGroup.ItemControl value={option.value} />
                            <RadioGroup.ItemText>{option.label}</RadioGroup.ItemText>
                          </RadioGroup.Item>
                        ))}
                      </RadioGroup.Root>
                    </Fieldset.Content>
                  </Fieldset.Root>

                  {/* Project brief */}
                  <Field.Root>
                    <Field.Label style={styles.labelRow}>
                      <span>Project context & goals</span>
                      <Text render={<span />} size="xs" tone="subtle" weight="normal">
                        Optional
                      </Text>
                    </Field.Label>
                    <Textarea
                      rows={4}
                      placeholder="Share your current stack, Figma or repo links, key milestones, or constraints we should know about…"
                      value={message}
                      onValueChange={setMessage}
                      style={styles.textarea}
                    />
                    <Field.Description>
                      Rough bullet points are plenty — we&apos;ll dig into architecture details on
                      our intro call.
                    </Field.Description>
                  </Field.Root>

                  {/* Stakeholder & NDA checkboxes */}
                  <VStack gap="3">
                    <Checkbox.Root size="md" palette={accentPalette}>
                      <Checkbox.Control
                        checked={isDecisionMaker}
                        onCheckedChange={(next) => setIsDecisionMaker(next === true)}
                      />
                      <Checkbox.Label>
                        I&apos;m the primary stakeholder or budget owner for this engagement
                      </Checkbox.Label>
                    </Checkbox.Root>

                    <Checkbox.Root size="md" palette={accentPalette}>
                      <Checkbox.Control
                        checked={requestNda}
                        onCheckedChange={(next) => setRequestNda(next === true)}
                      />
                      <Checkbox.Label>
                        Send a mutual NDA before we review repositories or product specs
                      </Checkbox.Label>
                    </Checkbox.Root>
                  </VStack>
                </VStack>

                <Separator decorative />

                {/* Submit footer */}
                <VStack gap="3">
                  {errorCount > 0 ? (
                    <Alert.Root status="error" variant="subtle" size="sm" palette={redPalette}>
                      <Alert.Indicator>
                        <AlertCircleIcon />
                      </Alert.Indicator>
                      <Alert.Content>
                        <Alert.Title>
                          {errorCount === 1
                            ? "Please complete 1 required field above before sending."
                            : `Please complete ${errorCount} required fields above before sending.`}
                        </Alert.Title>
                      </Alert.Content>
                    </Alert.Root>
                  ) : null}

                  <Button
                    type="submit"
                    variant="solid"
                    size="lg"
                    palette={accentPalette}
                    style={styles.fullWidth}
                  >
                    Send inquiry
                    <ArrowRightIcon />
                  </Button>

                  <VStack align="center" gap="1.5">
                    <Text variant="muted" size="xs" align="center" style={styles.legalText}>
                      By submitting this form you agree to our{" "}
                      <Link
                        href="#privacy"
                        variant="underline"
                        palette={accentPalette}
                        onClick={handlePrivacyClick}
                      >
                        Privacy Policy
                      </Link>
                      . {responseSla}.
                    </Text>
                  </VStack>
                </VStack>
              </VStack>
            </Card.Body>
          </Card.Root>
        )}
      </VStack>

      <Toaster toaster={queue} />
    </VStack>
  );
}
```

Credit: Inspired by [Contact Form](https://astryx.atmeta.com/playground?template=contact-form) from Astryx (MIT License · Copyright (c) 2026 Meta Platforms, Inc.)
