# layout.showcase

A few items side by side where the one in focus takes more of the room: featured photos, picks of the week. On small screens they stack, top to bottom. Children are layout.showcase.item; mark the one in focus with data-active

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

## Choosing between neighbours

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

| If it is for… | Use |
|---|---|
| A few items side by side where the one in focus takes more of the room: featured photos, picks of the week. On small screens they stack, top to bottom. Children are layout.showcase.item; mark the one in focus with data-active | `layout.showcase` (this page) |
| Equal items in a grid that all stay the same size | [`layout.collection`](https://www.prongs.dev/docs/intents/layout/collection.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.showcase 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.showcase` (this page) — A few items side by side where the one in focus takes more of the room: featured photos, picks of the week. On small screens they stack, top to bottom. Children are layout.showcase.item; mark the one in focus with data-active

  ```
  w-full flex-col flex-nowrap items-stretch gap-6 sm:flex-row
  sm:items-start sm:gap-2
  ```

Final classes

```
flex w-full flex-col flex-nowrap items-stretch gap-6 sm:flex-row
sm:items-start sm:gap-2
```

Definition

```ts
'layout.showcase': {
  kind: 'semantic',
  description: 'A few items side by side where the one in focus takes more of the room: featured photos, picks of the week. On small screens they stack, top to bottom. Children are layout.showcase.item; mark the one in focus with data-active',
  refs: ['arrange.row'],
  binding: {
    classes: 'w-full flex-col flex-nowrap items-stretch gap-6 sm:flex-row sm:items-start sm:gap-2',
  },
  notFor: [
    {
      context: 'equal items in a grid that all stay the same size',
      instead: 'layout.collection',
    },
  ],
},
```
