layout.collection
Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters
Read https://www.prongs.dev/docs/intents/layout/collection.md and tell me whether layout.collection fits what I am building.Layout intents
Example
<Layout intent="layout.collection">
{people.map((p) => (
<Layout key={p.id} intent="layout.panel">…</Layout>
))}
</Layout>Connections
Choosing between neighbours
If it is
Use
Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters
layout.collectionEqual items in a grid
rather thanlayout.splitlayout.collectionEqual items shown side by side as a grid
rather thanlayout.listlayout.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.collection 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.gridGrid of equal cells, as many columns as its own width fits
grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))]
layout.collectionEqual items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters
gap-6
grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-6
'layout.collection': {
kind: 'semantic',
description: 'Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters',
refs: ['arrange.grid'],
binding: { classes: 'gap-6' },
},