Skip to content

MarketingLumen Halo

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.

.md
pnpm dlx shadcn@latest add @beautiful-ui-pro/lumen-contact-section

Needs 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.

Set up the Beautiful UI registry

Free pieces install from their URL with no setup (that URL gives the Base UI build; Radix projects use /r/radix-nova/<name>.json, or add the registries below and the CLI picks your build). Pro pieces need the registries below and BEAUTIFUL_UI_TOKEN in .env.local.

components.json
{
  "registries": {
    "@beautiful-ui": "https://beautiful-ui.dev/r/{style}/{name}.json",
    "@beautiful-ui-pro": {
      "url": "https://beautiful-ui.dev/r/pro/{style}/{name}.json",
      "headers": { "Authorization": "Bearer ${BEAUTIFUL_UI_TOKEN}" }
    }
  }
}

MCP server

claude mcp add --transport http beautiful-ui https://beautiful-ui.dev/api/mcp
Catalog for agents: /llms.txt

Usage

Import it and pass your content. The props that matter most are listed next.

Example
"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.