# layout.divider

A break between two parts of the same content: groups in a menu, sections of a panel. Runs across whichever way its parent flows

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

## Example

```tsx
<Layout intent="layout.divider" />
```

## Choosing between neighbours

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

| If it is for… | Use |
|---|---|
| A break between two parts of the same content: groups in a menu, sections of a panel. Runs across whichever way its parent flows | `layout.divider` (this page) |
| Lines between the items of a list | [`layout.list`](https://www.prongs.dev/docs/intents/layout/list.md) |
| Lines between controls side by side | [`layout.toolbar`](https://www.prongs.dev/docs/intents/layout/toolbar.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: [`surface.rule`](https://www.prongs.dev/docs/intents/ui.md#surface-rule)

## 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.divider 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.rule`](https://www.prongs.dev/docs/intents/ui.md#surface-rule) — A hairline in the colour that shows on the surface it is on

  ```
  border-0 bg-surface-border
  ```

- `layout.divider` (this page) — A break between two parts of the same content: groups in a menu, sections of a panel. Runs across whichever way its parent flows

  ```
  m-0 h-auto shrink-0 grow-0 basis-px min-h-px min-w-px
  self-stretch
  ```

Final classes

```
border-0 bg-surface-border m-0 h-auto shrink-0 grow-0 basis-px
min-h-px min-w-px self-stretch
```

Definition

```ts
'layout.divider': {
  kind: 'semantic',
  description: 'A break between two parts of the same content: groups in a menu, sections of a panel. Runs across whichever way its parent flows',
  refs: ['surface.rule'],
  binding: {
    element: 'hr',
    classes: 'm-0 h-auto shrink-0 grow-0 basis-px min-h-px min-w-px self-stretch',
  },
  notFor: [
    { context: 'lines between the items of a list', instead: 'layout.list' },
    {
      context: 'lines between controls side by side',
      instead: 'layout.toolbar',
    },
  ],
},
```
