# Client decision (/ui/candidate-client-decision)

## What it shows [#what-it-shows]

A client's Yes or No on a person, with why.

## Props [#props]

| Prop | Type | What it does |
| --- | --- | --- |
| `candidateName` (required) | `string` | The candidate's name as the dialog should say it. |
| `decision` | `CandidateDecisionChoice \| null` | The answer already recorded, if any. |
| `reason` | `ReactNode` | The reason recorded with it, shown under the answer. |
| `onDecide` (required) | `(decision: CandidateDecisionChoice, reason: string) => Promise<void>` | Saves the answer and its reason. The dialog stays open, its buttons disabled, until the promise settles, then closes. When the promise rejects, the buttons come back with an error line under them. The reason is an empty string when `reasonOptional` let the client answer without one. |
| `suggestions` | `{ yes?: readonly string[]; no?: readonly string[]; }` | One-tap reasons for each answer, already worded. |
| `reasonOptional` | `boolean` | Lets the client answer without a reason: the dialog still asks why, and saves with none given. The reason is required without it. |
| `reasonPrompt` | `CandidateClientDecisionReasonPrompt` | How the reason is asked for. `dialog` (the default) is a typed reason in `CandidateDecisionReasonDialog`. `sheet` is the voice-first `CandidateDecisionReasonSheet`: speaking is the default, a suggested reason is one tap, typing is a tap away, and Skip saves with no reason where `reasonOptional` allows it. The sheet holds itself on a saving state while `onDecide`'s promise is pending and, when it rejects, keeps the reason and says so there, so the row shows no error of its own. If the sheet can't be downloaded, the row asks in the dialog. |
| `reasonSheet` | `CandidateClientDecisionSheetProps \| ((decision: CandidateDecisionChoice) => CandidateClientDecisionSheetProps)` | The sheet's own settings for `reasonPrompt="sheet"`, or a function of the answer being explained that returns them, for wording that names the answer. |
| `readOnly` | `boolean` | Shows the answer and takes none, for someone looking at a client's shortlist who can't answer for them: the recorded answer in words (`labels.readOnlyYes`, `labels.readOnlyNo`) with its reason, or `labels.unanswered`, and no Yes, No or Change. `onDecide` is never called. |
| `disabled` | `boolean` | Holds Yes, No and Change without hiding them, such as while the page the row sits on is loading someone else. A reason being asked for when it turns on is dropped, and nothing is decided. |
| `padding` | `"default" \| "none"` | `default` is the action row of a review card: inset like the card, under a keyline. `none` sits the row flush, with no keyline, in a container that already pads and rules it, such as a section of a profile. |
| `labels` | `Partial<CandidateClientDecisionLabels>` |   |

## Data it needs [#data-it-needs]

The component takes plain values and callbacks and keeps no records of its own. Pass it yours, from the Kith data layer or from a backend you already run.

## Copy to your agent [#copy-to-your-agent]

```text title="Copy to your agent"
Install RecruiterOS/recruit-ui and add a client's yes or no, with a reason, to each card of a shortlist.
```