> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/create-content/blocks/expandable.md).

# Expandable

Add an expandable block to a page to keep your pages shorter, hide longer content, or create FAQs

Expandable blocks are helpful in condensing what could otherwise be a lengthy paragraph. They are also great in step-by-step guides and FAQs.

By default, expandable blocks will be collapsed on your published docs site. If you want an expandable block to be expanded by default, open the block’s **Options menu** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FaS1QvPIBVYwhpFTGcPBN%2Foptions-menu.svg?alt=media&amp;token=3ee40bbf-f4fb-41fa-aa30-306b559cbe88" alt=""></picture> and choose **Expanded by default**.

### Example

<details open>

<summary>Step 1: Start using expandable blocks</summary>

To add an expandable block hit `/` on an empty block, or click the `+` on the left of the editor, and select **Expandable**.

Optionally, you can set expanded blocks to be **Expanded by default** in the block’s **Options menu** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FaS1QvPIBVYwhpFTGcPBN%2Foptions-menu.svg?alt=media&amp;token=3ee40bbf-f4fb-41fa-aa30-306b559cbe88" alt=""></picture> — just like this block.

</details>

<details>

<summary>Step 2: Add content to your block</summary>

Once you’ve inserted an expandable block, you can add content to it — including lists and code blocks.

</details>

## Representation in Markdown

{% code overflow="wrap" %}

```markdown
# Expandable blocks

<details open>

<summary>Add your expandable title here</summary>

Add your expandable body text here. This expandable is expanded by default.

</details>

<details>

<summary>Add your expandable title here</summary>

Add your expandable body text here. This expandable is collapsed by default.

</details>
```

{% endcode %}

### Limitations

There are some limitations on which blocks you can create inside of an expandable block. You can insert the following types of content into expandable blocks:

* Paragraphs
* Headings (1, 2, and 3)
* Unordered, ordered, and task lists
* Inline images

To check the full list at any time, start a new line in an expandable block and press `/` to bring up the insert palette.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/create-content/blocks/expandable.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
