# MapChromeProps

Props for [`MapChrome`](https://docs.mapcairn.com/api/map/MapChrome.md).

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { MapChromeProps } from "@mapcairn/map";
 
interface MapChromeProps
```

## Properties

### background

```ts
readonly background: ReactNode;
```

The map, drawn full-bleed behind everything inside the `main` landmark.

### bottomCentre

```ts
readonly bottomCentre?: ReactNode;
```

Measure toolbar, toasts and the tile-error banner.

### bottomEnd

```ts
readonly bottomEnd?: ReactNode;
```

Attribution.

### bottomStart

```ts
readonly bottomStart?: ReactNode;
```

Scale bar, cursor coordinates and zoom level (`MapReadout`).

### endStack

```ts
readonly endStack?: ReactNode;
```

Compass, main control group and zoom group (`EndStack`).

### mainLandmark

```ts
readonly mainLandmark?: boolean;
```

Whether the map is wrapped in the page's `main` landmark. Defaults to
true. Turn it off when the page has its own `main` or holds more than one
map, because a page has one `main` landmark; the map is then wrapped in a
plain element.

### mapKey

```ts
readonly mapKey?: ReactNode;
```

The key to the layers that are on (`MapKey`). It sits above the scale
bar, rides above the sheet or beside the side panel with it, is as tall
as the room under the search pill allows, and hides when there is no room
for its chip, while the credits are open, and at the full detent. A
prop named `key` would be React's own, so it is `mapKey`.

### modal

```ts
readonly modal: boolean;
```

True while the sheet is modal: everything but the sheet becomes `inert`.

### onViewportChange

```ts
readonly onViewportChange?: (viewport: {
        readonly width: number;
        readonly height: number;
    }) => void;
```

Called when the measured container size changes.

### sheet

```ts
readonly sheet?: ReactNode;
```

The `Sheet` (bottom sheet or side panel). Rendered outside every inert
group, so it stays operable while the rest of the chrome is inert.

### topStart

```ts
readonly topStart?: ReactNode;
```

Search pill.

### tour

```ts
readonly tour?: ReactNode;
```

The first-visit tour card. It sits in the free space at the top of the
map: under the search pill on a narrow screen, and between the search
column and the end stack in the panel layout. It hides, like the bottom
slots, while the sheet is at full, and while the bottom row, lifted above
the sheet or a toolbar, would run into it.

### tourSide

```ts
readonly tourSide?: "start" | "end";
```

In the panel layout, whether the tour card sits against the search
column and panel (`"start"`, the default) or against the end stack.

Source: [packages/map/src/chrome/MapChrome/MapChrome.tsx:34](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/chrome/MapChrome/MapChrome.tsx#L34)
