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
Layout intents
Example
One
Two
Three
<Layout intent="layout.collection">
…
</Layout>Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
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.collectionthis pageEqual items in a grid that all stay the same size
rather thanlayout.showcaselayout.collectionthis pageEqual items shown side by side as a grid
rather thanlayout.listlayout.collectionthis pageHeadline figures that stand on their own
rather thanlayout.tallylayout.collectionthis 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.
- Built from
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' },
},