# layout.teaser

A box in a layout.collection that previews one page and opens it as a whole: its nav.item title covers the box. Its border reads stronger than a layout.panel’s, and it lifts a level on hover

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

## Choosing between neighbours

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

| If it is for… | Use |
|---|---|
| A box in a layout.collection that previews one page and opens it as a whole: its nav.item title covers the box. Its border reads stronger than a layout.panel’s, and it lifts a level on hover | `layout.teaser` (this page) |
| A box that does not open anything | [`layout.panel`](https://www.prongs.dev/docs/intents/layout/panel.md) |
| A box in a collection that opens a page as a whole (rather than [`layout.panel`](https://www.prongs.dev/docs/intents/layout/panel.md)) | `layout.teaser` (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: [`surface.panel`](https://www.prongs.dev/docs/intents/ui.md#surface-panel), [`arrange.stack`](https://www.prongs.dev/docs/intents/ui.md#arrange-stack)

## 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.teaser 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.teaser` (this page) — A box in a layout.collection that previews one page and opens it as a whole: its nav.item title covers the box. Its border reads stronger than a layout.panel’s, and it lifts a level on hover

  ```
  relative gap-2 p-4 transition-colors
  has-[a:hover]:bg-surface-hover
  has-[button:hover]:bg-surface-hover
  ```

Final classes

```
surface rounded-md border border-surface-border flex min-w-0
flex-col relative gap-2 p-4 transition-colors
has-[a:hover]:bg-surface-hover
has-[button:hover]:bg-surface-hover
```

Definition

```ts
'layout.teaser': {
  kind: 'semantic',
  description: 'A box in a layout.collection that previews one page and opens it as a whole: its nav.item title covers the box. Its border reads stronger than a layout.panel’s, and it lifts a level on hover',
  refs: ['surface.panel', 'arrange.stack'],
  binding: {
    classes: 'relative gap-2 p-4 transition-colors has-[a:hover]:bg-surface-hover has-[button:hover]:bg-surface-hover',
  },
  notFor: [
    {
      context: 'a box that does not open anything',
      instead: 'layout.panel',
    },
  ],
},
```
