Block 84 of 297
Contact & Hours
Address, phone, email, opening hours and directions, with tel: and mailto: links built for you.
- Puck key
- ContactInfoBlock
- Export
- contactInfoBlock
- React component
- <ContactInfo />
- Path
- components/puck/contact-info-block.tsx
- Dependencies
- None
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
A contact section with address, phone and email in a left column and a building photo or static map on the right. An office hours card overlaps the bottom edge of the photo, and a directions button sits under the contact details. On phones the column stacks above the image.
- A city office or community center "Visit us" section
- The contact page for a small nonprofit with walk-in hours
- Facility pages for pools, libraries or recreation centers
Writing the content
- Type the Address one line per row. The first line is bold, so put the building or office name there.
- Enter Phone however you like it displayed, such as (217) 555-0142. The tap-to-call link is built from the digits.
- The hours card needs both an Hours heading and at least one row; up to 10 rows are allowed. Use "Closed" rather than leaving a day out.
- For Directions link, paste a share URL from a map service. Leave Directions link text blank to hide the button.
Accessibility
- Contact details are a description list with hidden "Address", "Phone" and "Email" terms, and the address uses an address element.
- Phone, email and directions links are underlined or button-styled, with a visible focus outline and a 44px minimum height.
- The photo's alt text comes from Image alt text. The hours card title is a heading one level below the section heading.
Customizing the code
- Icon circles, the hours icon and the button use indigo; swap the indigo- classes to rebrand.
- The photo is aspect-[4/3], and the hours overlap comes from -mt-16 sm:-mt-20 on its wrapper.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Addresstextarea
- Phonetext
- Emailtext
- Hours headingtext
- Hoursarray
- Directions link texttext
- Directions linktext
- Image URLtext
- Image alt texttext