Skip to content
Haze UI

Contact: split introduction and form

A contact introduction with response details and a labelled three-field form.

pnpm dlx shadcn@latest add @haze/contact-split-form
Open preview in a new tab
Liveno JavaScript

When to use

  • Collecting a visitor's name, email and message for a team
  • You can supply a real endpoint to receive form submissions

When not to use

  • You only need an email signup; use newsletter-inline

Installation

Add the Haze registry to components.json once, then install Contact: split introduction and form with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/contact-split-form
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
idstring"contact-split-form"Unique ID prefix for the section and all its fields.
eyebrowstring"Get in touch"Label above the section heading.
titlestringdemo headingHeading above the contact details.
descriptionstringdemo copyIntroductory contact copy.
headingLevel1 | 2 | 32Heading level for the section title.
emailstring"hello@example.com"Displayed contact address; the default is an example.
responseTimestringdemo response timeExpected response time shown alongside the email address.
formActionstring""POST endpoint. With no endpoint, submission is disabled and the form is labelled as a demo.
submitLabelstring"Send message"Submit button text.
classstring–Additional classes on the section.

Keyboard interactions

Tab
Move through the fields and, once configured, the submit button.

Accessibility

  • All three required controls have visible labels and use native browser validation.
  • The default preview announces that submission is unavailable until an endpoint is configured.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI block "Contact: split introduction and form" with `npx shadcn@latest add @haze/contact-split-form`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import ContactSplitForm from "@/components/haze/blocks/contact-split-form.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/contact-split-form.md

  • Customize with real content

    Adapt the Haze contact-split-form block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, email, responseTime, formAction, submitLabel, class. Keep the layout, the heading level rules and these accessibility details: All three required controls have visible labels and use native browser validation. The default preview announces that submission is unavailable until an endpoint is configured. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using contact-split-form, check it fits: use it when collecting a visitor's name, email and message for a team; you can supply a real endpoint to receive form submissions. Avoid it when you only need an email signup; use newsletter-inline. Alternatives: @haze/newsletter-inline.

Dependencies

  • npm: @lucide/astro
  • @haze/button
  • @haze/input
  • @haze/textarea
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog