# Contact, address and map

- **[Sections](/blocks/)**
- **[Contact](/blocks/contact/)**
- **Contact, address and map**

A visit page in two halves: the address, an opening-hours list, phone and email on one side, a map image with a directions link on the other.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/contact-map
  ```
- **Import**

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

Also called

- contact/map

- **About**: A visit page in two halves: the address, an opening-hours list, phone and email on one side, a map image with a directions link on the other. For a shop, studio or restaurant that people come to.
- **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 visit page in two halves: address, opening hours, phone and email on one side, a map image with a directions link on the other. For several locations, `contact-offices` is the better fit.
- **Writing for it**: - Hours need two to seven rows with a day (30, required) and a time (40). An empty time leaves a day with nothing next to it, which is how you show 'Closed' only if you write it.
- The address (160) keeps its line breaks, so write it as street on one line and postcode and city on the next.
- The map is a picture, not an embed. Use a static screenshot with a visible pin, and put the live route in the directions link.
- **Watch out for**: Phone numbers are turned into tel links by stripping everything but digits and plus, so write them in a form that leaves a valid number. Address, phone, email and the directions link each vanish when empty. With no map picture the hours take the map's half and the directions link sits under the contact lines, so a page built from words alone shows no empty box.

## Pairs well with

- **[Features, alternating](/blocks/features/alternating)**
- **[Testimonials, grid](/blocks/testimonials/grid)**
- **[Footer, simple](/blocks/footer/simple)**

## 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 ContactMap from '@/components/klarhimmel/blocks/contact-map';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactMap props={{
          "eyebrow": "Name a topic",
          "title": "Invite them to visit",
          "address": "Give the street address\nGive the town",
          "hoursTitle": "Name the hours",
          "hours": [
            {
              "day": "Name the days",
              "time": "00:00 to 00:00"
            },
            {
              "day": "Name the days",
              "time": "00:00 to 00:00"
            },
            {
              "day": "Name the day",
              "time": "Closed"
            }
          ],
          "phone": "+00 00 000 00 00",
          "email": "you@company.example",
          "directions": {
            "label": "Main action",
            "href": "#directions"
          },
          "map": {
            "src": "/pictures/map-4.svg",
            "alt": "A street map with a pin",
            "srcDark": "/pictures/map-4-dark.svg"
          }
        }} />
      </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.

- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 800 characters. Optional; empty is not rendered.
- **address**: Text, up to 160 characters. Optional; empty is not rendered.
- **hoursTitle**: Text, up to 40 characters. Optional; empty is not rendered.
- **hours**: List of up to 10. Each item: day, time.
- **phone**: Text, up to 40 characters.
- **email**: Text, up to 80 characters.
- **directions**: See the type.
- **buttons**: List of up to 2. Optional; empty is not rendered.
- **map**: See the type.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/contact/form-grid)

[Next](/blocks/contact/minimal)
