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

Renders

<div>

Profile

Example

Preview

One

Two

Three

<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

    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
  • A box in a collection that opens a page as a whole

    rather than layout.panel
    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.

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

    Bordered box, one level above what it sits in

    surface rounded-md border border-surface-border
  • arrange.stack

    Children in a column, free to shrink inside a row or grid

    flex min-w-0 flex-col
  • 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

    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',
},
],
},