Skip to content
Klarhimmel UI

Contact, mosaic tiles

Contact, mosaic tiles previewContact, mosaic tiles preview

Install

npx shadcn add @klarhimmel/contact-mosaic-tiles
DetailsAbout, usage, props and more

Five tiles in a mosaic: a heading card, a tinted band of actions beneath it, a tall captioned picture beside both, then an opening-hours card and a wider details card…

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-mosaic-tiles';
Also called
  • contact/mosaic-tiles
About
Five tiles in a mosaic: a heading card, a tinted band of actions beneath it, a tall captioned picture beside both, then an opening-hours card and a wider details card with a picture. On a phone the tiles stack in one column.
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

Pick it for a visit page with several small facts: a heading card, one tinted band of actions, a captioned picture, opening hours and a details card, all as tiles. For one plain details row choose contact-banner-details.

Writing for it

- Title up to 100 characters, lead up to 240; two buttons and one quiet link, each label up to 40 characters. - One to seven hours rows; address up to 120 characters, phone up to 40, email up to 80.

Watch out for

Two pictures are needed, a tall one and a small upright one; leave either empty only while drafting. The tiles stack in one column below about 56 rem.

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 ContactMosaicTiles from '@/components/klarhimmel/blocks/contact-mosaic-tiles';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactMosaicTiles props={{
          "eyebrow": "Name the section",
          "title": "Say how a visitor reaches you",
          "description": "Say in one line when you answer.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "textLink": {
            "label": "Name the extra page",
            "href": "#more"
          },
          "media": {
            "src": "/pictures/photo-wood3.avif",
            "alt": "A workbench with hand tools on the wall"
          },
          "caption": "Say what the picture shows.",
          "hoursTitle": "Name the hours block",
          "hours": [
            {
              "day": "Name the days",
              "time": "Name the times"
            },
            {
              "day": "Name the days",
              "time": "Name the times"
            }
          ],
          "detailsTitle": "Name the contact block",
          "address": "Give the street and town",
          "phone": "Give the phone number",
          "email": "Give the email address",
          "profile": {
            "label": "Name the profile",
            "href": "#profile"
          },
          "detailsMedia": {
            "src": "/pictures/photo-bakery1.avif",
            "alt": "A bakery counter with loaves and pastries behind glass"
          }
        }} />
      </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.

PropTypeDefaultDescription
eyebrowstring'Name the section'Text, up to 60 characters.
titlestring'Say how a visitor reaches you'Text, up to 100 characters.
descriptionstring'Say in one line when you answer.'Text, up to 240 characters.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
textLinkLink{…}Optional; empty is not rendered.
mediaMedia{…}See the type.
captionstring'Say what the picture shows.'Text, up to 120 characters.
hoursTitlestring'Name the hours block'Text, up to 60 characters.
hours{ day, time }[]3 itemsList of 1 to 7. Each item: day, time.
detailsTitlestring'Name the contact block'Text, up to 60 characters.
addressstring'Give the street and town'Text, up to 120 characters.
phonestring'Give the phone number'Text, up to 40 characters.
emailstring'Give the email address'Text, up to 80 characters.
profileLink{…}Optional; empty is not rendered.
detailsMediaMedia{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.