# layout.preview.bar

The bar on top of a layout.preview: what it shows on the left, its copy button on the right, ruled off from the stage

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.preview.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 bar on top of a layout.preview: what it shows on the left, its copy button on the right, ruled off from the stage | `layout.preview.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: [`layout.headline`](https://www.prongs.dev/docs/intents/layout/headline.md)

## 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.preview.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.headline`](https://www.prongs.dev/docs/intents/layout/headline.md) — Content at the start of a line and its controls at the end: a section’s title and its button, a panel’s title bar, a list entry with its actions. The controls drop below when the line runs out of room

  ```
  justify-between gap-x-4 gap-y-2
  ```

- `layout.preview.bar` (this page) — The bar on top of a layout.preview: what it shows on the left, its copy button on the right, ruled off from the stage

  ```
  h-10 flex-nowrap border-b border-code-border px-4
  ```

Final classes

```
flex flex-row items-center justify-between gap-x-4 gap-y-2 h-10
flex-nowrap border-b border-code-border px-4
```

Definition

```ts
'layout.preview.bar': {
  kind: 'semantic',
  description: 'The bar on top of a layout.preview: what it shows on the left, its copy button on the right, ruled off from the stage',
  refs: ['layout.headline'],
  binding: { classes: 'h-10 flex-nowrap border-b border-code-border px-4' },
},
```
