# layout.disclosure

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

Component: [`<Layout>`](https://www.prongs.dev/docs/components/layout.md) · Renders: `<details>` · Profile: [UI](https://www.prongs.dev/docs/intents/ui.md)

## Example

```tsx
<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 for… | 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`](https://www.prongs.dev/docs/intents/dialog/task.md) |
| Content that is always shown | [`layout.section`](https://www.prongs.dev/docs/intents/layout/section.md) |
| A short answer under a question, like an FAQ (rather than [`layout.disclosure.panel`](https://www.prongs.dev/docs/intents/layout/disclosure-panel.md)) | `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.

- Built from: [`arrange.stack`](https://www.prongs.dev/docs/intents/ui.md#arrange-stack)
- Used to build: [`layout.disclosure.panel`](https://www.prongs.dev/docs/intents/layout/disclosure-panel.md)

## 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`](https://www.prongs.dev/docs/intents/ui.md#arrange-stack) — Children in a column, free to shrink inside a row or grid

  ```
  flex min-w-0 flex-col
  ```

- `layout.disclosure` (this page) — 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' },
  ],
},
```
