# ComboboxOption

> One option in a Combobox's list: a 40px row with its name. Green when it's highlighted, a green tick when it's the one picked.

| | |
|---|---|
| Kind | component |
| Contract | `review` · [combobox-option.contract.yaml](https://github.com/Runceanu/rost/blob/master/contracts/combobox-option.contract.yaml) |
| Guidance | `proposed` |
| Source | [Figma 756:72](https://www.figma.com/design/1Zy0wiWKXQAvsfDBX3KR0d/UI-Kit-v01?node-id=756-72) · read 2026-11-17 · frozen 2026-11-17 |
| Implemented in | nowhere yet |

## Install

It lands in `src/rost/combobox-option/`, with what it needs and its contract:

```sh
npx github:Runceanu/rost add combobox-option
```

Then import `src/rost/fonts.css` and `src/rost/tokens.css` once, at the root of the app. More on this in [Install](https://rost.build/docs/install.md).

## Props

| Prop | Type | Values | Default |
|---|---|---|---|
| `selected` | boolean |  | `false` |
| `active` | boolean |  | `false` |
| `children` | slot |  |  |

## Anatomy

- `root`: A `role="option"`, as wide as the list, 40px tall, 12px in at the sides, with 8px corners. MenuItem's row.
- `check` (optional): Checkbox's tick, 16px, as a mask, on the picked option.

## When to use

- **The picked one, and the one you're on.** Medium weight and a tick for the picked option; the green row for the one the arrow keys are on. They can be the same row.

## When not to use

- **On its own.** An option only makes sense in a Combobox's list, which sets `active` and `selected`.

## Behaviour

Pressing it picks it and closes the list. Pointing at it highlights it, as the arrow keys do.

## Accessibility

- **Element**: `role="option"` with an id, so the input can point at it with `aria-activedescendant`. The picked one has `aria-selected="true"`. The tick is drawing.
- **Colour**: The names are 17:1 on the list's grey, 7:1 on the green. The tick is 10:1.

## Tokens

Every token this component uses, across all its variants.

| Token | Resolves to |
|---|---|
| `combobox-option/active/background` | `#006f27` |
| `combobox-option/active/check` | `#ededed` |
| `combobox-option/active/label` | `#ededed` |
| `combobox-option/check` | `#00d669` |
| `combobox-option/default/label` | `#ededed` |
| `font-family/base` | `'General Sans Variable'` |
| `spacing/gap/small` | `8px` |
| `spacing/gap/small-medium` | `12px` |
| `spacing/radius/small` | `8px` |
| `spacing/size/2xsmall` | `16px` |
| `spacing/size/medium` | `40px` |
| `typography/paragraph/font-size` | `14px` |
| `typography/paragraph/font-weight/medium` | `500` |
| `typography/paragraph/font-weight/regular` | `400` |
| `typography/paragraph/letter-spacing` | `0px` |
| `typography/paragraph/line-height` | `20px` |

## No token, on purpose

| Part | Property | Value | Why |
|---|---|---|---|
| `check` | `mask` | `url(./icon-check.svg) center / contain no-repeat` | The icon file itself. |

See it live, with every value of every variant: [rost.build/components/combobox/#combobox-option](https://rost.build/components/combobox/#combobox-option)
