Contact Form

Contact form with validation

Marketing BlockContact

Overview

Provides a self-contained contact form with loading, success, and error states. The "split" variant renders a two-column layout with a colored left panel for features/benefits and a right panel for custom form content via children.

Usage

import { ContactForm } from '@leanicon/web-builder-library'

Default

Built-in form with name, email, subject, and message fields. Handles loading, success, and error states internally.

Split

Two-column layout with a primary-colored left panel showing heading, subtitle, and feature checklist. The right panel accepts custom form content via children.

Accelerate your AI roadmap

Connect with an expert to explore how our products can fit your stack, data, and goals.

  • Align AI to your workflows and use cases
  • Choose deployment options that fit your infrastructure
  • Move from pilot to production — safely and securely

Split — without features

Heading and subtitle only, no feature checklist.

Accelerate your AI roadmap

Connect with an expert to explore how our products can fit your stack, data, and goals.

Split — without subtitle

Heading and feature checklist, no subtitle.

Accelerate your AI roadmap

  • Align AI to your workflows and use cases
  • Choose deployment options that fit your infrastructure
  • Move from pilot to production — safely and securely

Split — heading only

Minimal left panel with just a heading.

Get in touch

Dark mode

Split — dark mode

Accelerate your AI roadmap

Connect with an expert to explore how our products can fit your stack, data, and goals.

  • Align AI to your workflows and use cases
  • Choose deployment options that fit your infrastructure
  • Move from pilot to production — safely and securely

Split — without features — dark mode

Accelerate your AI roadmap

Connect with an expert to explore how our products can fit your stack, data, and goals.

Split — without subtitle — dark mode

Accelerate your AI roadmap

  • Align AI to your workflows and use cases
  • Choose deployment options that fit your infrastructure
  • Move from pilot to production — safely and securely

Split — heading only — dark mode

Get in touch

Props

Prop

Type

Default

Description

variant

"default" | "split"

"default"

Layout variant

onSubmit

(data: ContactFormData) => Promise<void>

—

Callback on form submission (default variant)

heading

string?

—

Left panel heading (split variant)

subtitle

string?

—

Left panel subtitle (split variant)

features

string[]?

—

Feature checklist items (split variant)

children

React.ReactNode?

—

Custom form content for right panel (split variant)

colorScheme

"light" | "dark"

—

Force light or dark mode

className

string

—

Additional CSS classes on root

ContactFormData

Field

Type

Description

name

string

Sender name

email

string

Sender email

subject

string

Message subject

message

string

Message body

Notes

  • The default variant manages all four fields and form state (loading, success, error) internally.
  • The split variant's left panel uses bg-primary with text-primary-foreground — it adapts to your theme.
  • Feature items render with a CircleCheck icon from Lucide.
  • Dark mode: pass colorScheme="dark" or place inside a .dark ancestor.

Props

NameTypeDefaultRequiredDescription
onSubmit((data: ContactFormData) => Promise<void>)—No
colorSchemeenum—No
classNamestring—No
variantenumdefaultNo
headingstring—No
subtitlestring—No
featuresstring[]—No