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

# Scripting Tags: Layout, Media, and Button Reference

> Full reference for every haze component script tag — layout, media, buttons, links, and color — with format notes and safe ID guidance.

Tags are the building blocks of a component script. Each tag produces one or more elements in the final Discord card — headings, body text, images, buttons, and more. You can combine as many tags as you need in a single template, and haze assembles them into a structured card in the order you write them.

<Note>
  Tags use a **colon** to separate the tag name from its value — `{title: Hello world}`. Values may span multiple lines. When a tag needs more than one piece of information (for example a button label and a style), separate the parts with `&&`.
</Note>

## Layout Tags

| Tag                      | Format               | Output                         |
| ------------------------ | -------------------- | ------------------------------ |
| `{color: …}`             | Hex or color name    | Accent color on the card       |
| `{accent: …}`            | Same as `{color: …}` | Alias of `color`               |
| `{title: …}`             | Text                 | `###` heading                  |
| `{header: …}`            | Text                 | Alias of `title`               |
| `{subtitle: …}`          | Text                 | Secondary line below the title |
| `{text: …}`              | Markdown text        | Body paragraph                 |
| `{content: …}`           | Markdown             | Alias of `text`                |
| `{description: …}`       | Markdown             | Alias of `text`                |
| `{note: …}`              | Markdown             | Alias of `text`                |
| `{footer: …}`            | Text                 | `-#` small footer line         |
| `{separator}`            | *(no value)*         | Visual spacing break           |
| `{divider}`              | *(no value)*         | Alias of `separator`           |
| `{code: …}`              | Text                 | Fenced code block              |
| `{spoiler: …}`           | Text                 | Spoiler-wrapped text           |
| `{field: Name && Value}` | Name `&&` Value      | Bold field label with value    |
| `{author: Name}`         | Name                 | Bold author line               |
| `{ping: @role}`          | Mention(s)           | Prepended mention line         |

## Media Tags

| Tag                    | Format                 | Output                            |
| ---------------------- | ---------------------- | --------------------------------- |
| `{thumbnail: url}`     | Image URL              | Thumbnail attached to the section |
| `{thumb: url}`         | Image URL              | Alias of `thumbnail`              |
| `{image: url}`         | Image URL              | Single media gallery item         |
| `{media: url && url2}` | URLs separated by `&&` | Gallery of up to 10 images        |
| `{gallery: url}`       | Image URL              | Alias of `media`                  |

## Buttons

### Action Buttons

Action buttons trigger interactions when clicked. The format is:

```text theme={null}
{button: custom_id && Label && style}
{button: custom_id && Label && style && emoji}
```

| Part        | Description                                                      |
| ----------- | ---------------------------------------------------------------- |
| `custom_id` | The interaction ID Discord sends back when the button is clicked |
| `Label`     | Text shown on the button                                         |
| `style`     | `primary`, `secondary`, `success`, or `danger`                   |
| `emoji`     | Optional emoji to display on the button                          |

**Ticket control IDs** — use these short IDs for close and claim buttons. They are safe and will not be mangled by Discord's emoji replacement:

| Action       | Safe IDs                        |
| ------------ | ------------------------------- |
| Close ticket | `close` or `haze.tickets.close` |
| Claim ticket | `claim` or `haze.tickets.claim` |

```text theme={null}
{button: close && Close && danger}
{button: claim && Claim && secondary}
{button: haze.tickets.close && Close ticket && danger}
{button: haze.tickets.claim && Claim ticket && secondary}
```

<Warning>
  **Do not write `haze:ticket:close`** (or any ID with colons that spell out an emoji name). Discord replaces `:ticket:` with 🎫 at the API level, turning your custom ID into `haze🎫close` — which haze will never match. Always use dots: `haze.tickets.close`.
</Warning>

**Style aliases:** `blurple` → `primary`, `grey` / `gray` → `secondary`, `green` → `success`, `red` → `danger`.

### Link Buttons

Link buttons open a URL in the browser. They do not fire an interaction.

```text theme={null}
{link: Label && https://example.com}
{url: https://example.com}
```

Use `{link: …}` when you want a visible label. Use `{url: …}` for a bare URL button with no custom label.

## Color Names

In addition to any `#RRGGBB` hex value, you can use these named colors with `{color: …}` or `{accent: …}`:

`haze` · `blurple` · `green` · `red` · `yellow` · `fuchsia` · `success` · `warn` · `white` · `black`

## In-Discord Reference

To see the full tag list at any time without leaving Discord, run:

```bash theme={null}
,script tags
```
