Simple contact
Three fields with a live character budget and both minimum and maximum length rules.
Live preview
Source
This exact file renders the preview above.
components/blocks/forms/simple-contact.tsx
components/ui/field.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
Three fields, because every additional field measurably reduces completion. The message rules are what stop a contact form filling with “hi” and with pasted novels.
- The remaining-character count lives in the help text, which is already announced.
- Reply-time expectation is set in the description rather than in an auto-reply.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Idle
- Too short
- Too long
- Success
Accessibility
- Budget in description
- The character count is part of `aria-describedby`, so it is announced with the field.
- Error focus
- Submitting an invalid form moves focus to the first problem.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All formsDetailed contact
Routing metadata alongside the message, so an enquiry reaches the right team without triage.
starter4 variantsSupport request
Severity, area, reproduction steps and attachments — with the response time shown before submitting.
intermediateFeatured4 variantsNewsletter footer
A validated subscribe form as the footer’s primary content, with an honest success message.
intermediate3 variants