layout.preview

A live example with its code attached underneath, in one frame with the code block’s edge: a layout.preview.bar, a layout.preview.stage, then a layout.preview.code

Component

Renders

<div>

Profile

Example

Preview

One

Two

Three

<Layout intent="layout.preview">
…
</Layout>

Choosing between neighbours

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

  • If it is

    Use

  • A live example with its code attached underneath, in one frame with the code block’s edge: a layout.preview.bar, a layout.preview.stage, then a layout.preview.code

    layout.preview this page
  • A live example with its code underneath

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

    A self-contained box about one thing: a sign-in box, a profile summary. Its border is quieter than a layout.teaser’s, since it does not open anything

    gap-3 p-[clamp(1rem,4vw,1.5rem)] border-surface-border/60
  • layout.preview

    A live example with its code attached underneath, in one frame with the code block’s edge: a layout.preview.bar, a layout.preview.stage, then a layout.preview.code

    gap-0 overflow-hidden p-0 border-code-border
Final classes
surface rounded-md border flex min-w-0 flex-col gap-0
overflow-hidden p-0 border-code-border
Definition
TS
'layout.preview': {
kind: 'semantic',
description: 'A live example with its code attached underneath, in one frame with the code block’s edge: a layout.preview.bar, a layout.preview.stage, then a layout.preview.code',
refs: ['layout.panel'],
binding: { classes: 'gap-0 overflow-hidden p-0 border-code-border' },
},