Contact Form
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.
Tell us what you're building
We partner with product and platform teams to architect design systems, ship accessible component libraries, and modernize frontend foundations.
Partners reply within 1 business day (Mon–Fri, CET & EST)Principal-led delivery
Senior design systems engineers and product designers work directly in your codebase from day one.
Tailored to your stack
Token architecture, accessible primitives, and CI guardrails shaped around how your teams ship.
Partner reply in 24h
Every brief is reviewed directly by our founding partners — no sales handoffs or intake queues.
Install
1npx stylexblocks add contact-formSource
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124import * 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'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'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> );}
Inspired by the Contact Form template from Astryx (MIT License · Copyright (c) 2026 Meta Platforms, Inc.).