layout.empty
What a region shows when it has nothing yet: an icon, a heading, a sentence and the first action
Read https://www.prongs.dev/docs/intents/layout/empty.md and tell me whether layout.empty fits what I am building.Layout intents
Example
No invoices yet
Invoices appear here once you bill a customer.
<Layout intent="layout.empty">
<Package />
<Text intent="heading.item">No invoices yet</Text>
<Text intent="text.caption">Invoices appear here once you bill a customer.</Text>
<Action intent="action.start" verb="create" href="/invoices/new">Create invoice</Action>
</Layout>Connections
Choosing between neighbours
If it is
Use
What a region shows when it has nothing yet: an icon, a heading, a sentence and the first action
layout.emptyStanding in for content that is still loading
layout.loading
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.empty 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.emptyWhat a region shows when it has nothing yet: an icon, a heading, a sentence and the first action
items-center gap-3 py-12 text-center
flex min-w-0 flex-col items-center gap-3 py-12 text-center
'layout.empty': {
kind: 'semantic',
description: 'What a region shows when it has nothing yet: an icon, a heading, a sentence and the first action',
refs: ['arrange.stack'],
binding: { classes: 'items-center gap-3 py-12 text-center' },
notFor: [
{
context: 'standing in for content that is still loading',
instead: 'layout.loading',
},
],
},