Contact, address and map


Install
npx shadcn add @klarhimmel/contact-mapDetailsAbout, usage, props and more
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
Import
- 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
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 |
|---|---|---|---|
eyebrow | string | 'Name a topic' | Text, up to 60 characters. |
title | string | 'Invite them to visit' | Text, up to 120 characters. |
description | string | - | Text, up to 800 characters. Optional; empty is not rendered. |
address | string | 'Give the street address
Give the to…' | Text, up to 160 characters. Optional; empty is not rendered. |
hoursTitle | string | 'Name the hours' | Text, up to 40 characters. Optional; empty is not rendered. |
hours | { day, time }[] | 3 items | List of up to 10. Each item: day, time. |
phone | string | '+00 00 000 00 00' | Text, up to 40 characters. |
email | string | 'you@company.example' | Text, up to 80 characters. |
directions | Link | {…} | See the type. |
buttons | Link[] | - | List of up to 2. Optional; empty is not rendered. |
map | Media | {…} | See the type. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |