ChromeSkeleton
The server-rendered stand-in for MapChrome: the search pill, the map
controls, the zoom group on a device with a fine pointer and the credits
button, each in the slot and grid the live chrome uses, so the live chrome
replaces it in the same boxes. Render it over the map's background colour,
as the first paint before the map app mounts.
This is a function exported by @mapcairn/map, checked against version 0.2.0.
Signature
import { ChromeSkeleton } from "@mapcairn/map";
function ChromeSkeleton(input: ChromeSkeletonProps): JSX.Element;
Parameters
{ copy, directions, draw, }input(ChromeSkeletonProps)
Returns
JSX.Element
Remarks
It is decorative: aria-hidden and inert, so nobody can focus a
control that does nothing yet. It reuses the MapChrome grid,
padding and slot classes, and the real controls' own classes. The layout
(bottom sheet or side panel) follows a media query built from the
constants chooseLayout uses, because the server cannot measure the
container. It writes no style attribute (production CSP is
style-src 'self'), uses no hooks and needs no provider (its words arrive
as copy), and is the same
in light and dark themes because it uses only theme tokens.
See also
Source: packages/map/src/chrome/ChromeSkeleton/ChromeSkeleton.tsx:86