# Sheet

> A panel that slides over the page from the right, for a task with more to it than a dialog: editing a client, an invoice's details.

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

## Install

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

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

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 |
|---|---|---|---|
| `open` | boolean |  | `false` |
| `title` | slot |  |  |
| `children` | slot |  |  |
| `actions` | slot |  |  |

## Anatomy

- `root`: The browser's `<dialog>`, its own look taken away and moved to the window's right edge, full height.
- `backdrop`: The page behind, dimmed to 72% of its own colour, as Dialog's is.
- `panel`: The plate: the full height, 400px wide, the title at the top and the buttons pinned to the bottom.
- `title`: An `<h2>` in title type, medium weight.
- `body`: Paragraph type. It takes the room there is and scrolls.
- `actions`: The Buttons in a row on the right, 8px apart, at the bottom.

## When to use

- **A task beside the page.** Editing something from a list without leaving it: a client, an invoice's details. The list stays in sight behind it.

## When not to use

- **A quick question.** Yes or no, or two fields. That's **Dialog**.
- **A whole job.** Something that takes several screens. Give it a page.

## Behaviour

It's a `<dialog>` opened as a modal and moved to the right edge, full height: the browser does focus, Esc and the page behind. The page dims as it does for Dialog. It doesn't slide in yet; it appears.

## Accessibility

- **Element**: `<dialog>` opened with `showModal()`, labelled by its title.
- **Name**: The title.
- **Keyboard**: Focus starts inside and stays there until it closes. Esc closes it.
- **Focus**: When it closes, focus goes back to what opened it.
- **Colour**: The title is 14:1 and the words 11:1 on the plate, in dark.

## Content

The title says what's being done (Edit client); the buttons say how it ends (Cancel, Save).

## Tokens

Every token this component uses, across all its variants.

| Token | Resolves to |
|---|---|
| `font-family/base` | `'General Sans Variable'` |
| `opacity/hard` | `0.72` |
| `shadow/floating` | `0px 16px 24px 0px rgba(0, 0, 0, 0.16)` |
| `sheet/backdrop` | `#060805` |
| `sheet/background` | `#171717` |
| `sheet/body` | `#d3d9d5` |
| `sheet/edge` | `#3a3a3a` |
| `sheet/title` | `#ededed` |
| `spacing/gap/large` | `24px` |
| `spacing/gap/medium` | `16px` |
| `spacing/gap/none` | `0px` |
| `spacing/gap/small` | `8px` |
| `spacing/outline/small` | `1px` |
| `typography/paragraph/font-size` | `14px` |
| `typography/paragraph/font-weight/regular` | `400` |
| `typography/paragraph/letter-spacing` | `0px` |
| `typography/paragraph/line-height` | `20px` |
| `typography/title/font-size` | `24px` |
| `typography/title/font-weight/medium` | `500` |
| `typography/title/letter-spacing` | `0px` |
| `typography/title/line-height` | `32px` |

## No token, on purpose

| Part | Property | Value | Why |
|---|---|---|---|
| `panel` | `outline-offset` | `calc(-1 * var(--spacing-outline-small))` | Composed from a token: the edge sits inside. |

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