# Offices map

> A dotted world map shaded by daylight, with pulsing offices, local times, arcs between them and a card that glides from city to city.

- Type: Block
- Page: https://uiarc.dev/components/blocks/offices-map
- Markdown: https://uiarc.dev/components/blocks/offices-map/markdown

- Access: Arc Pro
- Registry id: `offices-map`
- Source file: `registry/blocks/offices-map/offices-map.tsx`
- Built from: Avatar group
- Keywords: world map, offices, locations, time zones, dotted map, careers, about page, global team

Use this on an about, careers or contact page to show where a team works. Replace sampleOffices in offices-map-data.ts with your offices, time zones, photos and headcounts; local times, open hours and the daylight shading derive from the real clock.

## When to use

- An about or careers page that should show where a team works and that someone is always online.
- A contact page with several offices, each with an address and local time.

## When not to use

- Plotting hundreds of live data points; use revenue-globe or a mapping library.
- A single office; a contact-section office card is enough.

## Installation

Offices map is part of Arc Pro. The live preview is public; the source and install command need Pro.

### CLI with a Pro token

1. Create a token in your account and set it in the environment (or `.env.local`). Never commit it.

```bash
export ARC_PRO_TOKEN=arc_pro_...
```

2. Add the Pro registry to `components.json`:

```json
{
  "registries": {
    "@uiarc": "https://uiarc.dev/r/{name}.json",
    "@uiarc-pro": {
      "url": "https://uiarc.dev/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${ARC_PRO_TOKEN}"
      }
    }
  }
}
```

3. Install:

```bash
npx shadcn@latest add @uiarc-pro/offices-map
```

### Manual

Signed-in Pro members can copy the source from the Manual tab on the docs page.

- Plans: https://uiarc.dev/pricing
- Create a Pro token: https://uiarc.dev/account#pro-access
- Setup guide: https://uiarc.dev/docs/ai#pro-access

## Usage

```tsx
import { OfficesMap } from "@/components/arc/blocks/offices-map/offices-map";

export function Offices() {
  return (
    <OfficesMap
      title="Where we work"
      offices={[
        {
          id: "lisbon", city: "Lisbon", country: "Portugal", lat: 38.72, lon: -9.14, timeZone: "Europe/Lisbon",
          address: "Rua do Exemplo 10", headcount: 27,
          team: [{ name: "Sofia Ramirez", photo: "/team/sofia.jpg" }],
          photo: { src: "/offices/lisbon.jpg", alt: "The Lisbon office" },
        },
      ]}
    />
  );
}
```

## API reference

### OfficesMap

A dotted world map of a company's offices, shaded by where the sun is up right now. Open offices pulse, every office shows its local time, arcs travel between them, and a card with a photo and the team glides from office to office.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `offices` | `Office[]` | `sampleOffices` | Offices with id, city, country, lat, lon, IANA timeZone, address, headcount, team faces, photo and an optional labelSide. |
| `title` | `string` | `"Eight offices, one working day"` | Section heading. |
| `description` | `string` | – | Line under the heading. |
| `activeOfficeId` | `string \| null` | – | Controlled id of the office whose card is open. Leave it out for uncontrolled use. |
| `onActiveOfficeChange` | `(id: string \| null) => void` | – | Called when an office is hovered, focused, tapped or closed. |
| `workingHours` | `[number, number]` | `[9, 18]` | Local open hours, start inclusive and end exclusive, used for the open state and the open count. Weekends count as closed. |
| `autoplay` | `boolean` | `true` | Sends arcs between open offices on a loop while the map is in view. |
| `className` | `string` | – | Extra class on the section. |

## Keyboard interactions

| Keys | Action |
| --- | --- |
| Tab | Moves into the office markers. Focusing an office opens its card. |
| ArrowRight / ArrowLeft | Moves to the next or previous office from west to east. |
| Home / End | Jumps to the westernmost or easternmost office. |
| Escape | Closes the card. |

## Accessibility

- Each office is a button whose name includes the city, country, local time, open state and headcount.
- The card is a labelled group tied to the marker with aria-controls and aria-expanded.
- The open count above the map is a polite live region that updates as offices open and close.
- The dotted canvas and arcs are decorative and hidden from assistive tech.
- Below 620px the markers stay tappable and a row of city tabs drives a card panel under the map.

## Motion

- Land dots are shaded by the real subsolar point, so the night side of the map is dimmer and moves through the day.
- Arcs draw and retract along a curved path, then ping the office they land on. Pointing at an office fans arcs out to every other office.
- The card glides between offices on a spring that keeps its velocity; its content crossfades with a short blur.
- Reduced motion removes the pulse, arcs and glide; the card moves and changes instantly.

## Responsive behavior

- The map keeps its aspect ratio and scales with the container.
- Below 620px labels hide, markers shrink, and the card becomes a panel under the map chosen from a row of city tabs.

## Performance

- The land is drawn once per size on a canvas in six alpha batches and redrawn each minute for the daylight shading.
- Arcs only animate while the map is in view and the tab is visible.

## Notes for AI

- Choose it for about, careers or contact pages of distributed companies.
- Only offices and their time zones are required; local time, open state and the daylight shading come from the clock.
- Set labelSide on offices that sit close together so their labels do not overlap.
- Swap mapBounds in offices-map-data.ts to crop the map to your regions.

## Related

- [Contact section](https://uiarc.dev/components/blocks/contact-section/markdown): A validated contact form that morphs into a confirmation, support channels, and office cards with local times.
- [Team showcase](https://uiarc.dev/components/blocks/team-showcase/markdown): An image led team introduction with profiles that open in place.
- [Revenue globe](https://uiarc.dev/components/blocks/revenue-globe/markdown): A dotted globe where live payments arc home to headquarters, with a replayable day.

## Guidance for AI tools

Blocks are complete, self-contained screens with sample data. Replace the sample data and connect the callbacks described above. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://uiarc.dev/llms.txt
