Contact, form grid


Install
npx shadcn add https://ui.klarhimmel.com/r/contact-form-grid.jsonDetailsAbout, usage, props and more
A centred contact section: a two-part heading and a short line, then fields in two columns, a full-width message, and a row with a terms tick box and a send button.
Import
Import
- contact/form-grid
- About
- A centred contact section: a two-part heading and a short line, then fields in two columns, a full-width message, and a row with a terms tick box and a send button. One column on a phone.
- Category
- A form, a booking panel or office details. The page wires the submit. New project? Set it up once: /get-started/installation.
Notes
When to use it
A centred contact section with a two-part heading and a short line, then fields in two columns, a full-width message and a row with a terms tick box and a send button. Use contact-split when details should sit beside the form.
Writing for it
- Write each field's placeholder as the field's name, since it also names the field for assistive tech. - Put the short fields two to a row and leave the message full width. - Say in the line who the form is for and how soon the team answers.
Watch out for
The page wires the submit, so the block alone sends nothing. The terms tick box must link to real terms, and the form is one column on a phone.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | 'Name the section' | Text, up to 30 characters. |
titleStrong | string | 'Name the business' | Text, up to 30 characters. |
description | string | 'Say in one or two sentences who thi…' | Text, up to 240 characters. |
fields | { label, type, required }[] | 6 items | List of 1 to 8. Each item: label, type ('text' | 'email' | 'tel') (optional), required (optional). |
messageLabel | string | 'What the visitor wants to ask' | Text, up to 40 characters. |
consent | string | 'Say what the visitor agrees to by s…' | Text, up to 80 characters. |
consentLink | Link | {…} | Optional; empty is not rendered. |
submit | string | 'Send the message' | Text, up to 24 characters. |
action | string | - | Text, up to 300 characters. Optional; empty is not rendered. |
method | 'post' | 'get' | - | One of 'post', 'get'. Optional; empty is not rendered. |
hidden | { } | - | Optional; empty is not rendered. |
captcha | boolean | - | Optional; empty is not rendered. |
captchaSitekey | string | - | Text, up to 100 characters. Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |