Skip to content

hd-map-backdrop

Attributes and example

hd-map-backdrop

A still, faded map behind a tile’s content (A.1), centred on a place, with the hd-map-pin children as small marks; the place moves over the picture and a new picture is drawn once it leaves the middle. A picture, not a live map: no WebGL per tile. E-ink: grey. Reduced motion: no fades or gliding.

AttributeWhat it is
latLatitude of the place it shows, in degrees.
lonLongitude of the place it shows, in degrees.
zoomHow close it comes, 3 to 17 (14: the streets around it).Default 14.
lookauto follows the theme (light or dark); or always light, dark or streets.One of auto, light, dark, streets. Default auto.
fadeHow much of the map shows through the tile, evenly: soft shows most.One of soft, medium, strong. Default medium.
labelsfalse leaves out street names, places and symbols.Default true.
labelAccessible label.Default Map.
<hd-map-backdrop lat="52.3731" lon="4.8922" zoom="14" fade="soft">  <hd-map-pin lat="52.3731" lon="4.8922"></hd-map-pin></hd-map-backdrop><p>Home</p>

Styling

Set CSS variables on the component element. Its internal elements live in Shadow DOM; only the exposed named parts can be styled with ::part.

--hd-accent
The theme’s accent: active controls, links, highlights.
--hd-appearance
`light`, `dark` or `paper`, for what colours alone can’t decide.
--hd-border
Lines round tiles and between parts.
--hd-flat
1 on e-ink: no colours, glows or gradients, only black and white.
--hd-font-ui
The font of labels and running text.
--hd-motion-slow
A slow change, like a theme switching.
--hd-motion-tempo
CSS input read by hd-map-backdrop.
--hd-surface
A tile’s colour.
--hd-text
Text and big numbers.
--hd-text-faint
The quietest text: hints, units, times.
--hd-text-muted
Labels and secondary text.

Style the host

hd-map-backdrop {  --hd-accent: #2563eb;  max-width: 100%;}
Theme variables