// Contact.jsx — modern contact form with budget chips, validation, success state function Contact({ formRef, onSubmit }) { const [form, setForm] = React.useState({ name: "", email: "", company: "", details: "", budget: "", }); const [errors, setErrors] = React.useState({}); const [submitted, setSubmitted] = React.useState(false); const budgets = ["< $5K", "$5K – $15K", "$15K – $50K", "$50K+", "Not sure yet"]; const set = (k) => (e) => setForm((f) => ({ ...f, [k]: e.target.value })); const setBudget = (b) => setForm((f) => ({ ...f, budget: b })); const submit = (e) => { e.preventDefault(); const errs = {}; if (!form.name.trim()) errs.name = "Please add your name."; if (!form.email.trim() || !/^\S+@\S+\.\S+$/.test(form.email)) errs.email = "Please add a valid email."; if (!form.details.trim() || form.details.trim().length < 12) errs.details = "Tell us a bit more about your project."; setErrors(errs); if (Object.keys(errs).length === 0) { setSubmitted(true); onSubmit && onSubmit(); } }; return (
Get in touch

Tell us what's eating your week.

Drop a line below or book a 20-minute consult. Either way you'll get a written plan and a fixed quote back within one business day.

Three ways to start

Pick whichever feels least like work. We'll meet you there.

Instagram
@duck.task
Or grab a 20-min slot
Calendly integration — picks up where the form leaves off.
{submitted ? (

Got it — talk soon.

We'll reply with a written plan and a fixed quote within one business day.

) : (
{errors.name && {errors.name}}
{errors.email && {errors.email}}