Location

Location Detail

Storybook
Single-location detail layout with a top-of-page Google Maps view and a slot for header, info list, and any other store-detail content.

Loading playground

Overview

LocationDetail is the page-level layout for a single store. It renders a Google Maps view at the top (pinned to the store's coordinates) and exposes a default slot for the body content. Apps fill the slot with LocationHeader, LocationInfoList, and any other content (gallery, related stores, embedded forms) the page needs.

The map height adapts per breakpoint via two CSS custom properties: --location-detail-map-height (default 200px) at mobile, and --location-detail-map-height-lg (default 172px) at desktop.

Key Business & UX Benefits

  • The top-of-page map anchors the shopper visually before they scan address, hours, or services, matching the mental model of "I'm looking at where this store is" rather than "I'm reading a list of facts about it."
  • A single default slot keeps composition open: apps can drop in extra cards (gallery, current offers, return policy) without forking the layout.
  • The shared LocationFinderMap under the hood means a click on a marker in the finder leads to a detail page that visually matches the finder's map.

API Reference

LocationDetail

PropDefaultType
mapLocationrequired
apiPromiserequiredGoogleMapsApiPromise
mapIdrequiredstring
SlotType
defaultany

Required props are mapLocation (the single pin to render), the Google Maps apiPromise, and the mapId. The slot receives no props. Compose the body using the helper components below.

LocationHeader

Top section of the detail body: back link, store name, OpeningStatus, feature pills, and a row of Navigate / Call / Email action buttons.

PropDefaultType
namerequiredstring
backLink
openingHours
features
navigateUrlstring
phonestring
emailstring
EventType
navigate(event: "navigate"): void
call(event: "call"): void
email(event: "email"): void

Each action button emits a parameterless event (navigate, call, email) so the page can wire up routing, telephony, or mailto handling per app.

LocationInfoList

Vertical list shell for icon-led info rows (address, hours, payment methods, services). It's a thin <ul> wrapper with consistent spacing. Compose rows with LocationInfoListItem (icon + content) and LocationInfoListOpeningHours (a collapsible row that expands to show the weekly schedule via OpeningHoursWeeklyTable).

SlotType
defaultany

Composition

A typical detail page composes these pieces inside the LocationDetail slot:

<LocationDetail :map-location="store.coords" :api-promise="gmaps" map-id="...">
  <LocationHeader
    :name="store.name"
    :opening-hours="store.openingHours"
    :features="store.features"
    :navigate-url="store.mapsLink"
    :phone="store.phone"
    @navigate="trackNavigate"
    @call="trackCall"
  />
  <LocationInfoList>
    <LocationInfoListItem icon="essentials/location">{{ store.address }}</LocationInfoListItem>
    <LocationInfoListOpeningHours :opening-hours="store.openingHours" />
    <LocationInfoListItem icon="essentials/wallet">
      <PaymentMethodList :methods="store.paymentMethods" />
    </LocationInfoListItem>
  </LocationInfoList>
</LocationDetail>
Copyright © 2026 Laioutr GmbH