# layout.screen

A whole screen with its own background, like a maintenance, sign-in or error page. It takes the page colours, so the page is not the app’s background

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

## Example

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

## Connections

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

## Choosing between neighbours

| If it is for… | Use |
|---|---|
| A whole screen with its own background, like a maintenance, sign-in or error page. It takes the page colours, so the page is not the app’s background | `layout.screen` (this page) |
| A box inside a page, with its own colour | [`surface.panel`](https://www.prongs.dev/docs/intents/ui.md#surface-panel) |

## 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.screen 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.page`](https://www.prongs.dev/docs/intents/ui.md#surface-page) — The page itself: a background and text colour the page sets for itself, such as a maintenance or sign-in screen

  ```
  surface-page bg-background text-foreground
  ```

- [`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.screen` (this page) — A whole screen with its own background, like a maintenance, sign-in or error page. It takes the page colours, so the page is not the app’s background

  ```
  min-h-dvh
  ```

Final classes

```
surface-page bg-background text-foreground flex min-w-0 flex-col
min-h-dvh
```

Definition

```ts
'layout.screen': {
  kind: 'semantic',
  description: 'A whole screen with its own background, like a maintenance, sign-in or error page. It takes the page colours, so the page is not the app’s background',
  refs: ['surface.page', 'arrange.stack'],
  binding: { element: 'main', classes: 'min-h-dvh' },
  notFor: [
    {
      context: 'a box inside a page, with its own colour',
      instead: 'surface.panel',
    },
  ],
},
```
