prongs
GitHub

layout.page

A centred column of content. An app page has one; a marketing page may have one per full-width band

Component

Renders

<main>

Profile

Comes from

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

Example

Preview

layout.page: one centred column of content below the header

<Layout intent="layout.page">
<Text intent="heading.page">Projects</Text>
…
</Layout>

Connections

Choosing between neighbours

  • If it is

    Use

  • A centred column of content. An app page has one; a marketing page may have one per full-width band

    layout.page
  • A block inside a page, such as a titled list or a set of cards

    layout.section
  • A page for one short task like signing in

    layout.task
  • The heading and text that introduce a section

    layout.intro
  • A page without a sidebar

    rather than layout.shell
    layout.page
  • The main content

    rather than layout.aside
    layout.page
  • The outer column of a whole page

    rather than layout.section
    layout.page
  • An app page with panels, tables or grids

    rather than layout.article
    layout.page
  • The centred column of content inside it

    rather than layout.band
    layout.page

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

  • constraint.wide

    Centred, wide content width

    mx-auto w-full max-w-6xl px-4 sm:px-6
  • arrange.stack

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

    flex min-w-0 flex-col
  • layout.page

    A centred column of content. An app page has one; a marketing page may have one per full-width band

    gap-[clamp(2rem,6vw,2.5rem)] py-[clamp(2rem,6vw,2.5rem)]
Final classes
mx-auto w-full max-w-6xl px-4 sm:px-6 flex min-w-0 flex-col
gap-[clamp(2rem,6vw,2.5rem)] py-[clamp(2rem,6vw,2.5rem)]
Definition
TS
'layout.page': {
kind: 'semantic',
description: 'A centred column of content. An app page has one; a marketing page may have one per full-width band',
refs: ['constraint.wide', 'arrange.stack'],
binding: {
element: 'main',
classes: 'gap-[clamp(2rem,6vw,2.5rem)] py-[clamp(2rem,6vw,2.5rem)]',
},
notFor: [
{
context: 'a block inside a page, such as a titled list or a set of cards',
instead: 'layout.section',
},
{
context: 'a page for one short task like signing in',
instead: 'layout.task',
},
{
context: 'the heading and text that introduce a section',
instead: 'layout.intro',
},
],
},