prongs
GitHub

layout.disclosure

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

Component

Renders

<details>

Profile

Comes from

starter
Read https://www.prongs.dev/docs/intents/layout/disclosure.md and tell me whether layout.disclosure fits what I am building.

Example

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

    dialog.task
  • Content 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.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' },
],
},