# Fieldset

> A question with its choices: the question in medium paragraph type, the Radios or Checkboxes under it, and a line of help.

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

## Install

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

```sh
npx github:Runceanu/rost add fieldset
```

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 |
|---|---|---|---|
| `legend` | slot |  |  |
| `children` | slot |  |  |
| `help` | slot |  |  |

## Anatomy

- `root`: A `<fieldset>` with the browser's frame taken away. The question, the choices and the help, 12px apart.
- `legend`: The `<legend>`, in paragraph type, medium weight, the main text colour. A legend isn't one of the column's items, so it keeps its own 12px below.
- `options`: The choices in a column, 8px apart.
- `help`: Label type in the tertiary colour.

## When to use

- **One question, a few answers.** Radios that answer one question, or Checkboxes that belong together, like which months to include.

## When not to use

- **A single choice.** One Checkbox on its own needs no Fieldset: its words are its question.

## Behaviour

It groups the choices under their question. Radios inside share a `name`, and the browser keeps one picked.

## Accessibility

- **Element**: `<fieldset>` with a `<legend>`, so screen readers say the question before each choice.
- **Name**: The legend.
- **Colour**: The question is 14:1 and the help 7:1 on the dark page.

## Content

The legend is a question or a short label; the help says what happens with the answer.

## Tokens

Every token this component uses, across all its variants.

| Token | Resolves to |
|---|---|
| `fieldset/help` | `#999999` |
| `fieldset/legend` | `#ededed` |
| `font-family/base` | `'General Sans Variable'` |
| `spacing/gap/none` | `0px` |
| `spacing/gap/small` | `8px` |
| `spacing/gap/small-medium` | `12px` |
| `typography/label/font-size` | `12px` |
| `typography/label/font-weight/regular` | `400` |
| `typography/label/letter-spacing` | `0px` |
| `typography/label/line-height` | `14px` |
| `typography/paragraph/font-size` | `14px` |
| `typography/paragraph/font-weight/medium` | `500` |
| `typography/paragraph/letter-spacing` | `0px` |
| `typography/paragraph/line-height` | `20px` |

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