layout.list
A list of items of the same kind: articles, people, notifications. Children are layout.item
Read https://www.prongs.dev/docs/intents/layout/list.md and tell me whether layout.list fits what I am building.Layout intents
Example
- ALAda LovelaceOwner
- ATAlan TuringAdmin
- GHGrace HopperMember
<Layout intent="layout.list">
{members.map((m) => (
<Layout key={m.id} intent="layout.item">…</Layout>
))}
</Layout>Connections
Choosing between neighbours
If it is
Use
A list of items of the same kind: articles, people, notifications. Children are layout.item
layout.listRecords compared by the same fields, like a members table
layout.tableEqual items shown side by side as a grid
layout.collectionItems read one after another, like a feed or notifications
rather thanlayout.tablelayout.listLines between the items of a list
rather thanlayout.dividerlayout.list
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.list 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.listA list of items of the same kind: articles, people, notifications. Children are layout.item
divide-y divide-input
flex min-w-0 flex-col divide-y divide-input
'layout.list': {
kind: 'semantic',
description: 'A list of items of the same kind: articles, people, notifications. Children are layout.item',
refs: ['arrange.stack'],
binding: { element: 'ul', classes: 'divide-y divide-input' },
notFor: [
{
context: 'records compared by the same fields, like a members table',
instead: 'layout.table',
},
{
context: 'equal items shown side by side as a grid',
instead: 'layout.collection',
},
],
},