# Expand

The Expand shortcode displays an expandable/collapsible section of text on your page.

## Usage

    {{% expand [ <string> [ "true" | "false" ] ] %}}
    Yes!
    {{% /expand %}}

The first optional parameter defines the text that appears next to the expand/collapse icon. The default text is `"Expand me..."`.

The second optional parameter controls if the block is initially shown as expanded (`"true"`) or collapsed (`"false"`). The default ist `"false"`.

## Examples

I'll tell you a secret...

…maybe the next time you’ll open this expander!

### All defaults

Expand me...

Yes, you did it!

Show markup

    {{% expand %}}
    Yes, you did it!
    {{% /expand %}}

### Initially expanded

Expand me...

No need to press you!

Show markup

    {{% expand "Expand me..." "true" %}}
    No need to press you!
    {{% /expand %}}

### Arbitrary text

Show me endless possibilities

Some expandable text.

You can add:

- multiple paragraphs
- bullet point lists
- emphasized, bold and even bold emphasized text
- links
- other shortcodes besides `expand`
- etc.

    ...and even source code

> the possiblities are endless

Show markup

    {{% expand "Show me endless possibilities" %}}
    Some expandable text.

    You can add:

    - multiple paragraphs
    - bullet point lists
    - _emphasized_, **bold** and even **_bold emphasized_** text
    - [links](https://example.com)
    - other shortcodes besides `expand`
    - etc.

    ```plaintext
    ...and even source code
    ```

    > the possiblities are endless
    {{% /expand %}}