Contact SectionProv1.0.0
A short contact form beside the other ways to reach you. Fields check themselves when you leave them and again on send; once sent, the form turns into a confirmation in place with the address you'll reply to and a way to send another.
pnpm dlx shadcn@latest add @beautiful-ui-pro/lumen-contact-sectionNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
Styles didn't apply?
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Usage
Import it and pass your content. The props that matter most are listed next.
"use client";
import { ContactSection } from "@/components/ui/lumen/blocks/contact-section";
export function ContactPage() {
return (
<ContactSection
channels={[
{ id: "email", label: "Email", detail: "hello@example.com", href: "mailto:hello@example.com" },
{ id: "hours", label: "Support hours", detail: "Mon–Fri, 9:00–18:00 CET" },
]}
onSubmit={async (input) => {
const res = await fetch("/api/contact", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(input) });
if (!res.ok) throw new Error("Couldn't send it. Try again, or email us directly.");
}}
/>
);
}Props
onSubmit–({ name, email, topic, message }) => Promise<void>Send it (your API, a form service). Throw to show the error above the button.
topics["Sales", "Support", "Partnerships", "Something else"]string[]The choices for What's it about?
channels–{ id, label, detail, href? }[]Other ways to reach you, listed beside the form (an email address, a phone number, office hours).
labels–Partial<ContactLabels>Every word, for i18n: the titles, fields, errors and the confirmation sentBody(email).
Source
components/ui/lumen/blocks/contact-section.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.