Data region

Pro

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.

Markdown

Preview

Install

With the Candor CLI

First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/data-region

Brings in: locale, utils · npm: lucide-react@^1.67.0

Usage

TSX · The example above
"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>

PropTypeDefaultDescription
regionrequiredRegionInfo—The region's name, a line of detail, and where each service runs.
onlyOptionboolean | undefinedtrueSays this is the only region offered today. Defaults to true.
classNamestring | undefined—Extra classes for the outer element.

Strings

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

KeyEnglish
labelData region
onlyOptionThis is the only region offered today.

Types

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