# layout.terminal.bar

The title bar of a layout.terminal: window buttons, the title in the middle, 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.terminal.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 title bar of a layout.terminal: window buttons, the title in the middle, its controls on the right | `layout.terminal.bar` (this page) |
| The title bar of an example app | [`layout.window.bar`](https://www.prongs.dev/docs/intents/layout/window-bar.md) |

## 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.terminal.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.terminal.bar` (this page) — The title bar of a layout.terminal: window buttons, the title in the middle, its controls on the right

  ```
  relative shrink-0 flex-nowrap items-center justify-end gap-3
  border-b border-surface-border bg-background/50 px-3 py-2
  before:mr-auto before:size-2.5 before:shrink-0
  before:rounded-full before:bg-surface-active
  before:shadow-[16px_0_0_var(--surface-active),32px_0_0_var(--surface-active)]
  before:content-[''] [&>span]:absolute [&>span]:left-1/2
  [&>span]:-translate-x-1/2 [&>button]:h-auto
  [&>button]:bg-transparent [&>button]:px-0 [&>button]:py-0
  [&>button]:font-normal [&>button]:text-surface-muted
  [&>button:hover]:bg-transparent [&>button:hover]:text-foreground
  ```

Final classes

```
flex flex-row relative shrink-0 flex-nowrap items-center
justify-end gap-3 border-b border-surface-border
bg-background/50 px-3 py-2 before:mr-auto before:size-2.5
before:shrink-0 before:rounded-full before:bg-surface-active
before:shadow-[16px_0_0_var(--surface-active),32px_0_0_var(--surface-active)]
before:content-[''] [&>span]:absolute [&>span]:left-1/2
[&>span]:-translate-x-1/2 [&>button]:h-auto
[&>button]:bg-transparent [&>button]:px-0 [&>button]:py-0
[&>button]:font-normal [&>button]:text-surface-muted
[&>button:hover]:bg-transparent [&>button:hover]:text-foreground
```

Definition

```ts
'layout.terminal.bar': {
  kind: 'semantic',
  description: 'The title bar of a layout.terminal: window buttons, the title in the middle, its controls on the right',
  refs: ['arrange.row'],
  binding: {
    classes: 'relative shrink-0 flex-nowrap items-center justify-end gap-3 border-b border-surface-border bg-background/50 px-3 py-2 before:mr-auto before:size-2.5 before:shrink-0 before:rounded-full before:bg-surface-active before:shadow-[16px_0_0_var(--surface-active),32px_0_0_var(--surface-active)] before:content-[\'\'] [&>span]:absolute [&>span]:left-1/2 [&>span]:-translate-x-1/2 [&>button]:h-auto [&>button]:bg-transparent [&>button]:px-0 [&>button]:py-0 [&>button]:font-normal [&>button]:text-surface-muted [&>button:hover]:bg-transparent [&>button:hover]:text-foreground',
  },
  notFor: [
    {
      context: 'the title bar of an example app',
      instead: 'layout.window.bar',
    },
  ],
},
```
