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
backgroundImagestringBackground image URL (used in background variant)
sideImagestringSide image URL (used in split variant)
sideImagePosition"left" | "right""left"Position of the side image in split layout
onSubmit(data: FormData) => Promise<void> | voidCalled when form is submitted successfully
onError(err: unknown) => voidCalled when submission fails
onSuccess() => voidCalled 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
maxMessageLengthnumberMaximum 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> | voidSubmit handler
onError(err: unknown) => voidError handler
onSuccess() => voidSuccess handler