prongs
GitHub

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

Component

Renders

<div>

Profile

Comes from

Read https://www.prongs.dev/docs/intents/layout/teaser.md and tell me whether layout.teaser fits what I am building.

Example

Preview
<Layout intent="layout.teaser">
<Text intent="text.topic">Guide</Text>
<Text intent="heading.item">
<Action intent="nav.item" href={post.href}>{post.title}</Action>
</Text>
</Layout>

Connections

Choosing between neighbours

  • 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

    layout.teaser
  • A box that does not open anything

    layout.panel

For registry authors

Pack intent. prongs add editorial puts the editorial pack’s intents in your registry. They are then yours like the starter intents: 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-lg 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

    relative gap-2 p-4 transition-colors
    has-[a:hover]:bg-surface-hover
    has-[button:hover]:bg-surface-hover
Final classes
surface rounded-lg 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',
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',
},
],
},