# Contact, form grid

- **[Sections](/blocks/)**
- **[Contact](/blocks/contact/)**
- **Contact, form grid**

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

- **CLI**

  ```
  npx shadcn add https://ui.klarhimmel.com/r/contact-form-grid.json
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/contact-form-grid';
  ```

Also called

- 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

- **[FAQ, list](/blocks/faq/accordion)**
- **[Hero, centered](/blocks/hero/centered)**
- **[Footer, columns](/blocks/footer/link-columns)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import ContactFormGrid from '@/components/klarhimmel/blocks/contact-form-grid';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactFormGrid props={{
          "title": "Name the section",
          "titleStrong": "Name the business",
          "description": "Say in one or two sentences who this form is for, what they can ask and how soon the team answers.",
          "fields": [
            {
              "label": "The visitor’s first name",
              "type": "text",
              "required": true
            },
            {
              "label": "The visitor’s last name",
              "type": "text",
              "required": false
            },
            {
              "label": "Their company",
              "type": "text",
              "required": false
            },
            {
              "label": "Their role",
              "type": "text",
              "required": false
            },
            {
              "label": "Their email address",
              "type": "email",
              "required": true
            },
            {
              "label": "Their phone number",
              "type": "tel",
              "required": false
            }
          ],
          "messageLabel": "What the visitor wants to ask",
          "consent": "Say what the visitor agrees to by sending.",
          "consentLink": {
            "label": "Terms",
            "href": "#terms"
          },
          "submit": "Send the message"
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

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

- **title**: Text, up to 30 characters.
- **titleStrong**: Text, up to 30 characters.
- **description**: Text, up to 240 characters.
- **fields**: List of 1 to 8. Each item: label, type ('text' | 'email' | 'tel') (optional), required (optional).
- **messageLabel**: Text, up to 40 characters.
- **consent**: Text, up to 80 characters.
- **consentLink**: Optional; empty is not rendered.
- **submit**: Text, up to 24 characters.
- **action**: Text, up to 300 characters. Optional; empty is not rendered.
- **method**: One of 'post', 'get'. Optional; empty is not rendered.
- **hidden**: Optional; empty is not rendered.
- **captcha**: Optional; empty is not rendered.
- **captchaSitekey**: Text, up to 100 characters. Optional; empty is not rendered.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/contact/form)

[Next](/blocks/contact/map)
