# Downgrade impact

What moving to a smaller plan takes away, before you confirm: the features you lose (and what happens to anything that used them), the new monthly total, and when it takes effect. Confirm stays locked until you acknowledge the losses.

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

## Install

```bash
npx candor-ui add downgrade-impact
```

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

## Example

```tsx
"use client"

import { DowngradeImpact } from "@/components/downgrade-impact"
import type { PlanTier } from "@/lib/ops"

const enterprise: PlanTier = { id: "enterprise", name: "Enterprise", perSeat: 499, tagline: "Everything in Team, plus people behind it", includes: ["Everything in Team", "Security and deployment controls", "A named engineer on your account"] }
const team: PlanTier = { id: "team", name: "Team", perSeat: 249, tagline: "The whole product for an in-house team", includes: ["Chat, agents and reports", "Approvals and audit log", "SSO sign-in"] }

export default function Example() {
  return (
    <DowngradeImpact
      className="max-w-xl"
      from={enterprise}
      to={team}
      seats={8}
      losses={[
        { feature: "Deployment controls", consequence: "Your two Production deploy windows are removed; deploys follow the default approval rules." },
        { feature: "A named engineer", consequence: "Support moves to the shared queue." },
      ]}
      effectiveAt="2026-12-01"
      onConfirm={() => {}}
      onCancel={() => {}}
    />
  )
}
```

## <DowngradeImpact>

Props:

- `from: PlanTier`: The current plan.
- `to: PlanTier`: The smaller plan being moved to.
- `seats: number`: Seats on the account, for the old and new monthly totals.
- `losses: { feature: string; consequence: string }[]`: What goes, and what happens to things that depended on it.
- `effectiveAt: string`: When the new plan takes effect, as an ISO date.
- `onConfirm: () => void`: Called on confirm, which stays locked until the losses are acknowledged.
- `onCancel?: (() => void) | undefined`: Shows a button to keep the current plan; called when it's clicked.
- `className?: string | undefined`

## Strings (`downgradeImpact`)

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

- `moveTo`: Move to {plan}
- `to`: to
- `price`: ${amount}
- `perMonth`: a month
- `youllLose`: You’ll lose
- `takesEffect`: Takes effect on {date}. Until then nothing changes.
- `understand`: I understand what {plan} doesn’t include.
- `keep`: Keep {plan}
- `tickFirst`: Tick the box first.

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