Skip to main content
Version: 1.0.3

Contact Form

A modern, production-ready contact form component built for flexibility and great user experience. It supports real-time validation, async submissions, toast feedback, file uploads, and multiple layout variants like default, background, and split views.

Designed to be composable, accessible, and easy to integrate into any application.

Example Usage​

Contact Us

We would love to hear from you

Drag & drop files here or click to browse

All file types supported â€ĸ Max size: 10 MB

0 selected

đŸ“Ļ Installation​

ignix add component contact-form

Props​

ContactForm Props​

PropTypeDefaultDescription
childrenReact.ReactNodeRequiredForm content (Header, Content, Fields, etc.)
variant"default" | "background" | "split""default"Layout variant of the form
backgroundImagestring—Background image URL (used in background variant)
sideImagestring—Side image URL (used in split variant)
sideImagePosition"left" | "right""left"Position of the side image in split layout
onSubmit(data: FormData) => Promise<void> | void—Called when form is submitted successfully
onError(err: unknown) => void—Called when submission fails
onSuccess() => void—Called after successful submission (overrides default toast)

ContactForm.Header Props​

PropTypeDefaultDescription
titlestring"Contact Us"Form title
descriptionstring"We would love to hear from you"Subtitle/description text

ContactForm.Content Props​

PropTypeDefaultDescription
childrenReact.ReactNodeRequiredForm fields and content

ContactForm.Field Props​

PropTypeDefaultDescription
name"name" | "email" | "subject"RequiredField name used for validation and data
labelstringRequiredInput placeholder/label
typestring"text"Input type (e.g. text, email)

ContactForm.Textarea Props​

PropTypeDefaultDescription
name"message"RequiredField name
maxMessageLengthnumber—Maximum allowed message length

ContactForm.FileUpload Props​

PropTypeDefaultDescription
———Uses underlying FileUpload component props

â„šī¸ This component internally uses the FileUpload component. You can extend or customize it by modifying the source if needed.


ContactForm.Actions Props​

PropTypeDefaultDescription
———Submit button section (no configurable props currently)

ContactForm.Base Props​

PropTypeDefaultDescription
childrenReact.ReactNodeRequiredForm content
onSubmit(data: FormData) => Promise<void> | void—Submit handler
onError(err: unknown) => void—Error handler
onSuccess() => void—Success handler