Contact Form

A free React contact form template with Tailwind CSS, React Hook Form and Zod validation: name, email, company, topic, message and consent fields, accessible errors and a success screen.

ReactTailwind CSSReact Hook FormZodFree
contact-form.tsx

Get in touch

Questions, feedback or a project in mind? Send us a note.

Installation

Install the form libraries, then copy the code above into your project.

npm i react-hook-form zod @hookform/resolvers

About the Contact Form

A complete contact form with the fields most sites need: name, email, an optional company, a topic dropdown, a message and a consent checkbox. Validation runs on submit with clear messages under each field, and a success screen replaces the form once it's sent.

When to use it

Use it on a contact page, a support page, a pricing page's "Talk to sales" section, or in a modal behind a "Get in touch" button.

More form templates

All forms →