# Role matches (/ui/candidate-role-matches)

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

Roles a person may fit, with why.

## Props [#props]

### CandidateRoleMatchList [#candidaterolematchlist]

| Prop | Type | What it does |
| --- | --- | --- |
| `heading` (required) | `ReactNode` | The eyebrow over the list, such as "Possible roles for Mei". |
| `matches` (required) | `readonly TItem[]` |   |
| `onOpen` | `(id: TItem["id"]) => void` | Opens a role in place. When set, a click on the title calls it instead of following `href`, for a surface that already shows the person. |
| `onAddToRole` | `(id: TItem["id"]) => Promise<void>` | Enables the add action. Resolve once the candidate is on the role (the row then shows the added badge); reject when it failed, having told the person why, and the role stays addable. |
| `confirm` (required) | `CandidateRoleMatchConfirm<TItem>` |   |
| `labels` | `Partial<CandidateRoleMatchListLabels>` |   |

### CandidateRoleMatchSummary [#candidaterolematchsummary]

| Prop | Type | What it does |
| --- | --- | --- |
| `matches` (required) | `readonly TItem[]` |   |
| `onOpen` (required) | `(id: TItem["id"]) => void` | Called with a role's id when its row is activated. |

## 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 list of the roles a person may fit, with why and an add to role action.
```