# Terms

The app's terms; defaults are "environment" and "account".

- Registry name: `terms` (`@candor/terms`)
- Tier: Free (MIT). No licence key needed.
- Docs: https://candor.themethodic.com/docs/terms

## Install

```bash
npx candor-ui add terms
```

Run `npx candor-ui@latest init` once first (https://candor.themethodic.com/get-started.md). Without the CLI: `npx shadcn@latest add @candor/terms`.

## Example

```tsx
"use client"

import { TermsProvider, useTerms } from "@/components/terms"

function Heading() {
  const terms = useTerms()
  return <p className="text-sm">Choose a {terms.environment} to work in.</p>
}

export default function Example() {
  return (
    <div className="flex flex-col gap-2">
      <Heading />
      <TermsProvider terms={{ environment: "project" }}>
        <Heading />
      </TermsProvider>
    </div>
  )
}
```

## <TermsProvider>

Props:

- `terms: Partial<Terms>`: The words to use; any left out fall back to the ones above.
- `children: React.ReactNode`

## Functions

### useTerms

```ts
useTerms()
```

The app's terms; defaults are "environment" and "account".

## Types

### Terms

The app's words for its own concepts, so components read like the product: one app says "org", another "project" or "workspace".

```ts
{ /** One place agents act in. */ environment: string environments: string /** The paying customer that owns the environments. */ account: string /** The product's own name, for labels like "In the app" and "What the app will read". */ product: 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`.
