layout.disclosure

Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings

Component

Renders

<details>

Profile

Example

Preview
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.disclosure this page
  • Something that interrupts the page until dealt with

    dialog.task
  • Content that is always shown

    layout.section
  • A short answer under a question, like an FAQ

    rather than layout.disclosure.panel
    layout.disclosure this 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.

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.stack

    Children in a column, free to shrink inside a row or grid

    flex min-w-0 flex-col
  • layout.disclosure

    Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings

    gap-2
Final classes
flex min-w-0 flex-col gap-2
Definition
TS
'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' },
],
},