# layout.window.bar

The toolbar of a layout.window, drawn like a browser: back, forward and reload, the address, and its controls on the right

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.bar">
  …
</Layout>
```

## Choosing between neighbours

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

| If it is for… | Use |
|---|---|
| The toolbar of a layout.window, drawn like a browser: back, forward and reload, the address, and its controls on the right | `layout.window.bar` (this page) |
| A row of controls for the content below it | [`layout.toolbar`](https://www.prongs.dev/docs/intents/layout/toolbar.md) |
| The title bar of an example app (rather than [`layout.terminal.bar`](https://www.prongs.dev/docs/intents/layout/terminal-bar.md)) | `layout.window.bar` (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: [`arrange.row`](https://www.prongs.dev/docs/intents/ui.md#arrange-row)

## 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.bar 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.

- [`arrange.row`](https://www.prongs.dev/docs/intents/ui.md#arrange-row) — Children in a wrapping row

  ```
  flex flex-row flex-wrap items-center
  ```

- `layout.window.bar` (this page) — The toolbar of a layout.window, drawn like a browser: back, forward and reload, the address, and its controls on the right

  ```
  relative flex-nowrap items-center gap-5 rounded-t-lg border-b
  border-surface-border px-4 py-2.5 text-surface-muted
  [&>svg]:size-4 [&>svg]:shrink-0 [&>:last-child]:ml-auto
  [&>button]:h-7 [&>button]:px-3 [&>button]:py-0
  [&>button]:text-xs [&>button]:border
  [&>button]:border-surface-border
  [&>button[aria-pressed=false]]:bg-background
  [&>button[aria-pressed=false]]:text-foreground
  [&>button[aria-pressed=false]:hover]:bg-surface-hover
  ```

Final classes

```
flex flex-row relative flex-nowrap items-center gap-5
rounded-t-lg border-b border-surface-border px-4 py-2.5
text-surface-muted [&>svg]:size-4 [&>svg]:shrink-0
[&>:last-child]:ml-auto [&>button]:h-7 [&>button]:px-3
[&>button]:py-0 [&>button]:text-xs [&>button]:border
[&>button]:border-surface-border
[&>button[aria-pressed=false]]:bg-background
[&>button[aria-pressed=false]]:text-foreground
[&>button[aria-pressed=false]:hover]:bg-surface-hover
```

Definition

```ts
'layout.window.bar': {
  kind: 'semantic',
  description: 'The toolbar of a layout.window, drawn like a browser: back, forward and reload, the address, and its controls on the right',
  refs: ['arrange.row'],
  binding: {
    classes: 'relative flex-nowrap items-center gap-5 rounded-t-lg border-b border-surface-border px-4 py-2.5 text-surface-muted [&>svg]:size-4 [&>svg]:shrink-0 [&>:last-child]:ml-auto [&>button]:h-7 [&>button]:px-3 [&>button]:py-0 [&>button]:text-xs [&>button]:border [&>button]:border-surface-border [&>button[aria-pressed=false]]:bg-background [&>button[aria-pressed=false]]:text-foreground [&>button[aria-pressed=false]:hover]:bg-surface-hover',
  },
  notFor: [
    {
      context: 'a row of controls for the content below it',
      instead: 'layout.toolbar',
    },
  ],
},
```
