Studiov0.6.0
Studio/Patterns/Form Section

Form Section

Content

Contact or signup form section with field layout, validation feedback, and submission CTA. Suitable for contact pages, lead capture, and onboarding flows.

Code Example

<section className="py-20">
  <div className="max-w-2xl mx-auto px-6">
    <h2 className="text-3xl font-bold mb-2">Get in Touch</h2>
    <p className="text-muted-foreground mb-8">We&apos;ll respond within one business day.</p>
    <form className="space-y-5" onSubmit={handleSubmit}>
      <div className="grid grid-cols-1 sm:grid-cols-2 gap-5">
        <div>
          <label className="text-sm font-medium block mb-1.5">First Name</label>
          <input
            type="text"
            className="w-full rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"
            placeholder="Jane"
          />
        </div>
        <div>
          <label className="text-sm font-medium block mb-1.5">Last Name</label>
          <input
            type="text"
            className="w-full rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"
            placeholder="Doe"
          />
        </div>
      </div>
      <div>
        <label className="text-sm font-medium block mb-1.5">Email</label>
        <input
          type="email"
          className="w-full rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"
          placeholder="jane@example.com"
        />
      </div>
      <div>
        <label className="text-sm font-medium block mb-1.5">Message</label>
        <textarea
          rows={4}
          className="w-full rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring resize-none"
          placeholder="How can we help?"
        />
      </div>
      <Button type="submit" size="lg" className="w-full">Send Message</Button>
    </form>
  </div>
</section>

Variants (2)

Single Column

Stacked labels and inputs, full-width submit button

columns= 1showHeader= true

Two Column

First name / last name and other paired fields side by side

columns= 2showHeader= true

Guidelines

Do

  • Label every field clearly above the input
  • Show inline validation errors below the field
  • Disable the submit button during submission
  • Provide a success confirmation after submission

Don't

  • Place more than 6 fields in a single-column form
  • Use placeholder text as the only label
  • Clear the form on validation error
  • Submit without client-side validation

Use Cases

  • Contact pages with name/email/message
  • Newsletter or waitlist signup forms
  • Investment inquiry forms (PRT)
  • Onboarding intake flows

Details

Category
Content
Reference Component
FormSection
Variants
2
Guidelines
4 dos, 4 donts
Back to all patterns