# Data region

Where the account's data lives and is processed, service by service. Read only: it states facts the service supplies, and says when only one region is offered rather than showing a picker with one option.

- Registry name: `data-region` (`@candor/data-region`)
- Tier: Pro. Installing it needs a Pro, Premium or Team licence key: the person runs `npx candor-ui key <key>` themselves; never ask for the key in chat or write it to a file.
- Docs: https://candor.themethodic.com/docs/data-region

## Install

```bash
npx candor-ui add data-region
```

Run `npx candor-ui@latest init` once first (https://candor.themethodic.com/get-started.md). Without the CLI: `npx shadcn@latest add @candor/data-region`.
It brings in: locale, utils.
npm packages: lucide-react@^1.67.0.

## Example

```tsx
"use client"

import { DataRegion } from "@/components/data-region"

export default function Example() {
  return (
    <DataRegion
      className="max-w-lg"
      region={{
        name: "United States",
        detail: "Your threads, runs and files are stored and processed in the US.",
        services: [
          { what: "Threads and messages", where: "US East (Virginia)" },
          { what: "Run logs and audit log", where: "US East (Virginia)" },
          { what: "Model calls", where: "US, through each vendor’s US endpoint" },
          { what: "Backups", where: "US West (Oregon)" },
        ],
      }}
    />
  )
}
```

## <DataRegion>

Props:

- `region: RegionInfo`: The region's name, a line of detail, and where each service runs.
- `onlyOption?: boolean | undefined` (default `true`): Says this is the only region offered today. Defaults to true.
- `className?: string | undefined`

## Strings (`dataRegion`)

The fixed words, English by default. Override any of them under `dataRegion` in `<LocaleProvider strings={{ dataRegion: { … } }}>`; the table is exported as `dataRegionStrings`.

- `label`: Data region
- `onlyOption`: This is the only region offered today.

## Types

### RegionInfo

```ts
{ name: string; detail: string; services: { what: string; where: string }[] }
```

## Rules for using Candor UI

- Components take plain typed data. Never pass model output as HTML or render it as a link; messages are typed blocks.
- A control that can't be used says why: wrap it in `<Locked reason="…">`, don't just disable it.
- Don't show a value you don't have: leave it out (it renders as —) rather than guess. An estimate is labelled as one.
- Nothing is pre-selected in a decision a person makes, and the agent is named from your app's data, never from model output.
- Your app's words go in `LocaleProvider` (fixed strings) and `TermsProvider` (nouns); entity kinds and agent roles in `EntityKindsProvider` and `AgentRolesProvider`.
