> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mira.lgbt/llms.txt
> Use this file to discover all available pages before exploring further.

# Containers

> Discord's newer layout blocks, with headers, dividers, galleries, and buttons.

A container is Discord's newer message layout. It looks similar to an embed, but instead of
filling in fixed slots like a title and a footer, you stack blocks in the order you want them.

Start one with `{container}`, then add each block underneath.

```text Announcement container theme={null}
{container: #5865F2}
{container.header: Announcement}
{container.thumbnail: {member.display_avatar}}
{container.description: Welcome, {member.mention}!}
{container.separator: large}
```

`{box}` and `{ctr}` are shorter names for the same thing, so `{box.text: …}` and
`{container.description: …}` do exactly the same job.

## Nodes

| Node                         | Aliases                    | Value               | Description                                                      |
| ---------------------------- | -------------------------- | ------------------- | ---------------------------------------------------------------- |
| `{container}`                | `{box}`, `{ctr}`           | hex, optional       | Starts a new container                                           |
| `{container.color: …}`       |                            | hex                 | Sets or changes the side bar colour                              |
| `{container.header: …}`      | `.heading`, `.h`, `.title` | text                | A heading. Adds `##` for you if you leave it off                 |
| `{container.description: …}` | `.desc`, `.text`, `.body`  | text                | A block of body text                                             |
| `{container.thumbnail: …}`   | `.thumb`, `.icon`          | link                | Small image beside the text next to it                           |
| `{container.image: …}`       | `.img`, `.gallery`         | `link [\| link …]`  | Full width image, or a gallery when you separate links with `\|` |
| `{container.separator}`      | `.sep`, `.hr`              | `small` or `large`  | A dividing line                                                  |
| `{container.button: …}`      | `.btn`, `.b`               | key and value pairs | A button inside the container                                    |

## Thumbnails pair with text

A thumbnail and a description sitting next to each other are joined into one block, with the
image on the right and the text on the left.

```text These produce the same thing theme={null}
{container.thumbnail: {track.image}}
{container.description: Now playing}
```

```text theme={null}
{container.description: Now playing}
{container.thumbnail: {track.image}}
```

<Info>
  Order doesn't matter, so put the thumbnail above or below its text. Two thumbnails in a row
  will **close off the first pair** and start a new one.
</Info>

## Multi-line text

Body text can run over as many lines as you like, and Discord's markdown works inside it.

```text Now playing block theme={null}
{box.color: dominant}
{box.text:**track**
-# [{track.name|lower}]({track.spotify_url})
**artist**
-# [{artist.name|lower}]({artist.url})}
{box.thumbnail: {track.image}}
```

## Buttons

Buttons go inside a container with `{container.button: …}` and use the same keys as normal
buttons. See [Buttons](/scripting/buttons) for the full list.

```text theme={null}
{container.button: label:Open profile url:{lastfm.url}}
```
