prongs
GitHub

layout.panel

A self-contained box about one thing: a sign-in box, a profile summary

Component

Renders

<div>

Profile

Comes from

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

Example

Preview
AL

Ada Lovelace

Owner · London

<Layout intent="layout.panel">
<Media intent="media.person" src={user.avatarUrl} alt={user.name} size="lg" />
<Text intent="heading.item">{user.name}</Text>
</Layout>

Connections

Choosing between neighbours

  • If it is

    Use

  • A self-contained box about one thing: a sign-in box, a profile summary

    layout.panel
  • A visible box with a background or border

    rather than layout.anchor
    layout.panel
  • A standalone box that is not in a list

    rather than layout.item
    layout.panel
  • Content that is always there

    rather than layout.notice
    layout.panel
  • A box that does not open anything

    rather than layout.teaser
    layout.panel

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.panel 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.panel

    A self-contained box about one thing: a sign-in box, a profile summary

    gap-3 p-[clamp(1rem,4vw,1.5rem)]
Final classes
surface rounded-lg border border-surface-border flex min-w-0
flex-col gap-3 p-[clamp(1rem,4vw,1.5rem)]
Definition
TS
'layout.panel': {
kind: 'semantic',
description: 'A self-contained box about one thing: a sign-in box, a profile summary',
refs: ['surface.panel', 'arrange.stack'],
binding: { classes: 'gap-3 p-[clamp(1rem,4vw,1.5rem)]' },
},