Skip to content

Contact

Contact Split

Every way to reach you beside an enquiry form with services checkboxes and sending states.

Layout and motion from the Nitip template — see it in context

Installation

$ npx shadcn@latest add https://framebrick.co/r/blocks/contact-split.json

Usage

import { ContactSplit } from "@/components/contact-split";
import { HeroTitle } from "@/components/hero-title";

<HeroTitle title="Get in touch" breadcrumbs={[{ label: "Home", href: "/" }, { label: "Contact" }]} />
<ContactSplit
  email="hello@example.com"
  onSubmit={async (data) => {
    const res = await fetch("/api/contact", { method: "POST", body: data });
    if (!res.ok) throw new Error("Failed");
  }}
/>

Props

PropTypeDefaultDescription
titlestring—Section heading for screen readers (visually hidden).
email / phonestring—Shown as mailto and tel links.
address / directionsstring—Address and a map link (Get directions, new tab).
hours{ days, time }[]—Rows under Business hours.
socials{ label, href }[]—Links under Connect with us (new tab).
formTitlestring—Heading of the form (h3).
servicesstring[]6 servicesCheckboxes; the checked ones are sent as services. [] hides them.
onSubmit(data: FormData) => Promise<void>—Sends the form; throw to show the error state. Without it the form only pretends to send.
labelsobject—Every heading, label and button state.
classNamestring—Classes for the <section>.
  • Below 1024px details, a line and the form stack; from 1024px the details fill the row, a vertical line sits 96px from each side and the form takes half the row (up to 800px).
  • Fields: first and last name and email (required), phone, the services, a message — shadcn input, checkbox, textarea, label and button.
  • Sending shows a spinner and disables the button; success says Thank you and resets; failure says Something went wrong. Both are announced; typing again resets the button.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this block in your own project.

Create a React + Tailwind CSS block called ContactSplit (Next.js, shadcn input / checkbox / textarea / label / button).
- <section className="py-(--section-y)"> with a visually hidden h2; container mx-auto max-w-(--container) px-(--gutter); stacked, a row from
  1024px (items-start, gap-24) with an <hr> that becomes a vertical line (border-l, self-stretch) between the two sides.
- Details (flex-1): groups with border-t and py-5, each an h3 (font-heading text-h3 semibold) and rows 20px apart — "Contact us" (Email /
  Phone rows: muted label left, link right), "Our location" (address and a "Get directions" text link whose underline grows), "Business
  hours" (days / time rows), "Connect with us" (links, new tab).
- Form (half the row from 1024px, max 800px): an h3 heading; a 2-column grid from 768px of First name*, Last name*, Email*, Phone; a labelled
  group of service checkboxes (2 columns from 640px, each wrapped in its label, name="services"); a 200px message; a full-width submit.
- Submit: pending → spinner + "Sending…" and disabled; success → "Thank you" and form.reset(); error → "Something went wrong" on a light
  destructive fill; a role="status" sr-only line announces it; typing resets the button.
- Only shadcn variables and block tokens.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy