# Confidence mark

How sure the system is, with what it rests on. Three bars fill for low, medium and high; unknown draws no bars at all, so it can't be read as "low". The word is always printed; the basis is on hover and for screen readers.

- Registry name: `confidence-mark` (`@candor/confidence-mark`)
- 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/confidence-mark

## Install

```bash
npx candor-ui add confidence-mark
```

Run `npx candor-ui@latest init` once first (https://candor.themethodic.com/get-started.md). Without the CLI: `npx shadcn@latest add @candor/confidence-mark`.
It brings in: know, locale, tooltip, utils.

## Example

```tsx
"use client"

import { ConfidenceMark } from "@/components/confidence-mark"

export default function Example() {
  return (
    <div className="flex flex-wrap gap-4">
      <ConfidenceMark value="high" basis="Two sources agree, one read today." />
      <ConfidenceMark value="medium" basis="One source: the migration was read 2 days ago." />
      <ConfidenceMark value="low" basis="Only the agent's inference; no document covers it." />
      <ConfidenceMark value="unknown" basis="Keel hasn't read anything about this yet." />
    </div>
  )
}
```

## <ConfidenceMark>

Props:

- `value: Confidence`: How sure: high, medium, low or unknown.
- `basis: string`: What the confidence rests on, e.g. "3 sources agree", shown on hover.
- `className?: string | undefined`

## Strings (`confidenceMark`)

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

- `unknown`: Unknown confidence
- `low`: Low confidence
- `medium`: Medium confidence
- `high`: High confidence
- `basis`: : {basis}

## 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`.
