# mapLinks

> Links every `data-map-key` row and pin in the host's document at once, by listening on the document, so markup rendered on the server lights up without each row being an island.

```ts
import { mapLinks } from "@sdxc/ui/map";
```

Links every `data-map-key` row and pin in the host's document at once, by listening on the
document, so markup rendered on the server lights up without each row being an island. The
listeners go when the host leaves the page.

## Signature

```ts
mapLinks(): MixinDescriptor<HTMLElement>
```

## Examples

```tsx
<span hidden mix={mapLinks()} />
```

## Used with it

The events, constants and types its module publishes, each imported from `@sdxc/ui/map` too.

### MAP_KEY_ATTRIBUTE

Attribute naming the record a row or pin stands for.

#### Signature

```ts
const MAP_KEY_ATTRIBUTE = "data-map-key"
```

### MAP_HIGHLIGHTED_ATTRIBUTE

Attribute present on every element of the record under the pointer or focus.

#### Signature

```ts
const MAP_HIGHLIGHTED_ATTRIBUTE = "data-highlighted"
```
