layout.list
A list of items of the same kind: articles, people, notifications. Children are layout.item
Layout intents
Example
- One
- Two
- Three
<Layout intent="layout.list">
…
</Layout>Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
If it is
Use
A list of items of the same kind: articles, people, notifications. Children are layout.item
layout.listthis pageRecords 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.listthis pageA list of records someone reads or acts on
rather thanlayout.pointslayout.listthis pageA list of items someone reads or acts on
rather thanlayout.terminal.loglayout.listthis pageLines between the items of a list
rather thanlayout.dividerlayout.listthis 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.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',
},
],
},