# layout.feature

A home page section pairing a pitch with a live demo: a layout.feature.copy and a layout.feature.demo, side by side on wide screens, the copy taking the narrower side

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

## Choosing between neighbours

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

| If it is for… | Use |
|---|---|
| A home page section pairing a pitch with a live demo: a layout.feature.copy and a layout.feature.demo, side by side on wide screens, the copy taking the narrower side | `layout.feature` (this page) |
| A home page section pairing a pitch with a live demo (rather than [`layout.panel`](https://www.prongs.dev/docs/intents/layout/panel.md)) | `layout.feature` (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.panel`](https://www.prongs.dev/docs/intents/layout/panel.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.feature 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.panel`](https://www.prongs.dev/docs/intents/ui.md#surface-panel) — Bordered box, one level above what it sits in

  ```
  surface rounded-md border border-surface-border
  ```

- [`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.panel`](https://www.prongs.dev/docs/intents/layout/panel.md) — A self-contained box about one thing: a sign-in box, a profile summary. Its border is quieter than a layout.teaser’s, since it does not open anything

  ```
  gap-3 p-[clamp(1rem,4vw,1.5rem)] border-surface-border/60
  ```

- `layout.feature` (this page) — A home page section pairing a pitch with a live demo: a layout.feature.copy and a layout.feature.demo, side by side on wide screens, the copy taking the narrower side

  ```
  gap-0 p-2 sm:p-3 lg:grid
  lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)] lg:items-stretch
  ```

Final classes

```
surface rounded-md border flex min-w-0 flex-col
border-surface-border/60 gap-0 p-2 sm:p-3 lg:grid
lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)] lg:items-stretch
```

Definition

```ts
'layout.feature': {
  kind: 'semantic',
  description: 'A home page section pairing a pitch with a live demo: a layout.feature.copy and a layout.feature.demo, side by side on wide screens, the copy taking the narrower side',
  refs: ['layout.panel'],
  binding: {
    classes: 'gap-0 p-2 sm:p-3 lg:grid lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)] lg:items-stretch',
  },
},
```
