layout.disclosure
Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings
Read https://www.prongs.dev/docs/intents/layout/disclosure.md and tell me whether layout.disclosure fits what I am building.Layout intents
Example
What is an intent?
A named purpose: what a part of your interface is for, which your registry turns into how it looks.
<Layout intent="layout.disclosure">
<Text intent="text.summary">What is an intent?</Text>
<Text intent="text.body">A named purpose…</Text>
</Layout>Connections
Choosing between neighbours
If it is
Use
Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings
layout.disclosureSomething that interrupts the page until dealt with
dialog.taskContent that is always shown
layout.section
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.disclosure 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.disclosureContent that opens and closes in place under a text.summary line: an FAQ answer, advanced settings
gap-2
flex min-w-0 flex-col gap-2
'layout.disclosure': {
kind: 'semantic',
description: 'Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings',
refs: ['arrange.stack'],
binding: { element: 'details', classes: 'gap-2' },
notFor: [
{
context: 'something that interrupts the page until dealt with',
instead: 'dialog.task',
},
{ context: 'content that is always shown', instead: 'layout.section' },
],
},