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
Layout intents
Example
<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.teaserthis pageA box that does not open anything
layout.panelA box in a collection that opens a page as a whole
rather thanlayout.panellayout.teaserthis 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
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.panelBordered box, one level above what it sits in
surface rounded-md border border-surface-border
arrange.stackChildren in a column, free to shrink inside a row or grid
flex min-w-0 flex-col
layout.teaserA 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
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
'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',
},
],
},