layout.disclosure
Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings
Layout intents
Example
Show more
The content it opens.
<Layout intent="layout.disclosure">
<Text intent="text.summary">Show more</Text>
…
</Layout>Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
If it is
Use
Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings
layout.disclosurethis pageSomething that interrupts the page until dealt with
dialog.taskContent that is always shown
layout.sectionA short answer under a question, like an FAQ
rather thanlayout.disclosure.panellayout.disclosurethis 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
- Used to build
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' },
],
},