# SheetProps

Props for [`Sheet`](https://docs.mapcairn.com/api/map/Sheet.md).

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { SheetProps } from "@mapcairn/map";
 
interface SheetProps
```

## Properties

### brand

```ts
readonly brand?: ReactNode;
```

A decorative brand (a host's mark and name) shown in a row above the
title. It is `aria-hidden`, so the title stays the accessible name; pass
nothing for no row. In the sheet layout the row is left out at the peek
detent, where there is no room for it.

### children

```ts
readonly children: ReactNode;
```

The sheet's content, below its title.

### detent

```ts
readonly detent: SheetDetent;
```

The current detent. Used only in the sheet layout.

### id

```ts
readonly id: string;
```

The element id, for `aria-controls` on the control that opens it.

### onClose

```ts
readonly onClose: () => void;
```

The app's single close action (Close button and Escape).

### onDetentChange

```ts
readonly onDetentChange: (detent: SheetDetent) => void;
```

Called when the person moves the sheet to another detent. The app keeps it and passes it back as `detent`.

### onModalChange

```ts
readonly onModalChange?: (modal: boolean) => void;
```

Called with true while the sheet is modal (open at the full detent in the
sheet layout), and false otherwise. The app passes it on to `MapChrome`'s
`modal`, which makes everything else `inert`.

### open

```ts
readonly open: boolean;
```

Whether the sheet is shown.

### restoreFocus

```ts
readonly restoreFocus?: () => void;
```

Called after the sheet closes, to put focus back where it came from.

### testId

```ts
readonly testId?: string;
```

Sets `data-testid`. Defaults to the id.

### title

```ts
readonly title: string;
```

The heading text, which also names the dialog or region.

## See also

- [`SheetDetent`](https://docs.mapcairn.com/api/core/SheetDetent.md)

Source: [packages/map/src/chrome/Sheet/Sheet.tsx:54](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/chrome/Sheet/Sheet.tsx#L54)
