# layout.window

A framed preview of an app inside a page: a title bar above the app

Component: [`<Layout>`](https://www.prongs.dev/docs/components/layout.md) · Renders: `<div>` · Profile: [UI](https://www.prongs.dev/docs/intents/ui.md)

## Example

```tsx
<Layout intent="layout.window">
  …
</Layout>
```

## Choosing between neighbours

Find the row that describes your element, and use the intent on the right.

| If it is for… | Use |
|---|---|
| A framed preview of an app inside a page: a title bar above the app | `layout.window` (this page) |
| A box of related content | [`layout.panel`](https://www.prongs.dev/docs/intents/layout/panel.md) |
| The framed app itself (rather than [`layout.stage`](https://www.prongs.dev/docs/intents/layout/stage.md)) | `layout.window` (this page) |
| A framed preview of the app itself (rather than [`layout.terminal`](https://www.prongs.dev/docs/intents/layout/terminal.md)) | `layout.window` (this page) |
| A framed preview with a title bar (rather than [`layout.demo`](https://www.prongs.dev/docs/intents/layout/demo.md)) | `layout.window` (this page) |

## Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

- Built from: [`surface.panel`](https://www.prongs.dev/docs/intents/ui.md#surface-panel), [`arrange.stack`](https://www.prongs.dev/docs/intents/ui.md#arrange-stack)

## For registry authors

**Starter intents.** These are the intents `prongs add` puts in your registry, shown in this site’s theme. Yours are your own `registry.ts`: rename, restyle and add to them, and see them with `prongs add gallery`.

What this intent is built from and its entry in `components/prongs/registry.ts`. You only need this to change how it looks or to add an intent like it.

How layout.window resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

- [`surface.panel`](https://www.prongs.dev/docs/intents/ui.md#surface-panel) — Bordered box, one level above what it sits in

  ```
  surface rounded-md border border-surface-border
  ```

- [`arrange.stack`](https://www.prongs.dev/docs/intents/ui.md#arrange-stack) — Children in a column, free to shrink inside a row or grid

  ```
  flex min-w-0 flex-col
  ```

- `layout.window` (this page) — A framed preview of an app inside a page: a title bar above the app

  ```
  relative overflow-visible rounded-lg shadow-xl
  shadow-black/[0.06] dark:shadow-2xl dark:shadow-black/40
  ```

Final classes

```
surface border border-surface-border flex min-w-0 flex-col
relative overflow-visible rounded-lg shadow-xl
shadow-black/[0.06] dark:shadow-2xl dark:shadow-black/40
```

Definition

```ts
'layout.window': {
  kind: 'semantic',
  description: 'A framed preview of an app inside a page: a title bar above the app',
  refs: ['surface.panel', 'arrange.stack'],
  binding: {
    classes: 'relative overflow-visible rounded-lg shadow-xl shadow-black/[0.06] dark:shadow-2xl dark:shadow-black/40',
  },
  notFor: [{ context: 'a box of related content', instead: 'layout.panel' }],
},
```
