layout.split
Two parts of one section side by side that stack on phones: an image beside its text, a form beside a preview. data-reverse puts the second part first on wider screens
Read https://www.prongs.dev/docs/intents/layout/split.md and tell me whether layout.split fits what I am building.Layout intents
Example
Linen shirt
$68
Washed linen, relaxed fit.
<Layout intent="layout.split">
<Media intent="media.image" src={product.image} alt={product.name} />
<Layout intent="layout.group">
<Text intent="heading.item">{product.name}</Text>
<Action intent="action.submit" verb="add to cart">Add to cart</Action>
</Layout>
</Layout>Connections
Choosing between neighbours
If it is
Use
Two parts of one section side by side that stack on phones: an image beside its text, a form beside a preview. data-reverse puts the second part first on wider screens
layout.splitEqual items in a grid
layout.collection
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.split 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.
arrange.stackChildren in a column, free to shrink inside a row or grid
flex min-w-0 flex-col
layout.splitTwo parts of one section side by side that stack on phones: an image beside its text, a form beside a preview. data-reverse puts the second part first on wider screens
gap-8 md:grid md:grid-cols-2 md:items-center md:data-[reverse]:[&>:first-child]:order-last
flex min-w-0 flex-col gap-8 md:grid md:grid-cols-2 md:items-center md:data-[reverse]:[&>:first-child]:order-last
'layout.split': {
kind: 'semantic',
description: 'Two parts of one section side by side that stack on phones: an image beside its text, a form beside a preview. data-reverse puts the second part first on wider screens',
refs: ['arrange.stack'],
binding: {
classes: 'gap-8 md:grid md:grid-cols-2 md:items-center md:data-[reverse]:[&>:first-child]:order-last',
},
notFor: [{ context: 'equal items in a grid', instead: 'layout.collection' }],
},