Skip to main content

Map

Provider-agnostic interactive map embed with responsive aspect ratio, accompanying address block, and external "view on map" link. Wraps any <iframe> (Google Maps, OpenStreetMap, Mapbox, etc.) in a consistent container with a lazy-loaded placeholder and semantic address markup for users who cannot interact with the embed.

Usage​

When to use

  • Showing the location of a physical venue, office, or landmark inside content
  • Any "find us" block that combines a map, an address, and an external link
  • When the consumer wants a consistent responsive aspect ratio around a third-party map embed

When not to use

  • For interactive mapping experiences with custom layers, markers, and state - use a dedicated mapping library directly
  • For a list of multiple locations - render multiple map components or use a dedicated listing pattern
  • For driving directions - link out to an external mapping service

Do

  • Provide a descriptive title on the iframe
  • Include a plain-text address alongside the visual map so users who cannot interact with the embed still get the location
  • Link out to the full external map for users who need richer interaction

Don't

  • Rely on the map iframe alone to convey the address
  • Auto-play location or geolocation without user consent

API​

Slots​

SlotRequiredDescription
address-Plain-text address displayed alongside the map.
link-External link object with url, text, and optional is_external keys.

Props​

PropTypeDefaultDescription
srcstring-Embed URL for the map provider.
titlestringEmbedded mapAccessible title for the embed.
classesarray-Additional CSS class words merged into the root element.
attributesobject-Additional HTML attributes spread on the root element.

Classes​

ClassCapabilityDefaultDescription
.smSize-Small.
.mdSizeYesMedium.
.lgSize-Large.
.flatElevationYesNo elevation.
.raisedElevation-Slight elevation.

Examples​

Address only​

Address block without an embed (map fails or is suppressed).

Loading​

Skeleton placeholder shown before the iframe loads.

Accessibility​

  • WCAG 2.2 AA
  • The <iframe> has a descriptive title attribute so screen readers announce the embed.
  • The address is rendered inside an <address> element for semantic markup.
  • A text address is always present alongside the visual map so screen reader users can access the location without interacting with the iframe.
  • The external link has descriptive text (e.g. "View on Google Maps") - not just "click here".
  • loading - placeholder/shell shown before load