> For the complete documentation index, see [llms.txt](https://simple.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simple.superiormc.cn/arcmenu-wiki/menu-configuration/menus/frontend.md).

# Frontend element types

`frontend` defines a menu's visible content. Each element specifies a `type`, followed by common properties and the fields supported by that type. Hit regions and actions are configured separately in `backend`.

## Element structure

```yaml
frontend:
  title:
    type: text
    content: '&fWelcome'
    size: 5
    offset: {y: 24, z: 1}
```

The hierarchy is **`frontend` → element name (`title`) → properties (`type`, `content`, etc.)**.

Choose element names that are unique within the menu, including grouped elements and backend regions. Use the lowercase `type` values below.

| Type        | Purpose                 | Spigot                    |
| ----------- | ----------------------- | ------------------------- |
| `text`      | Text.                   | Static text supported.    |
| `rectangle` | Rectangular background. | Supported.                |
| `frame`     | Rectangular border.     | Supported.                |
| `line`      | Line or divider.        | Supported.                |
| `image`     | PNG image.              | Unavailable.              |
| `item`      | Item display.           | Vanilla materials only.   |
| `block`     | Block display.          | Supported.                |
| `group`     | Collection of elements. | Basic grouping supported. |

The YAML examples on this page are menu fragments. Merge their elements into the existing `frontend` section rather than repeating the top-level section.

## Common properties

These properties belong directly under the element name, at the same level as `type`.

| Property   | Purpose                                                  | Default           |
| ---------- | -------------------------------------------------------- | ----------------- |
| `offset`   | Position, with `x`, `y` and `z` child fields.            | `0` on each axis. |
| `rotation` | Rotation in degrees, with `x`, `y` and `z` child fields. | `0` on each axis. |
| `scale`    | Scale factors.                                           | `1` on each axis. |
| `visible`  | Whether the element is visible.                          | `true`.           |

### `offset`

Sets position and layering. Directions and units are explained in [Canvas, coordinates and screen placement](/arcmenu-wiki/menu-configuration/menus/canvas.md). Elements inside groups are positioned relative to their group.

### `rotation`

Use `rotation.z` to rotate within the menu plane and `rotation.x` or `rotation.y` to tilt an element. Rotation affects visible elements without automatically rotating their hit regions.

### `scale`

Text, rectangles, frames, lines, images and groups use `scale.x` and `scale.y`. Items and blocks also support an independent `scale.z` for depth.

Scale values cannot be `0`; hide elements with `visible: false`. Positive values are normally appropriate, while negative values flip the corresponding direction. See [Groups and reusable templates](/arcmenu-wiki/menu-configuration/menus/groups-templates.md) for group scaling.

### `visible`

`false` hides an element, or all children when applied to a group. It does not close the menu or automatically remove a corresponding backend region.

## Type-specific properties

### Text: `text`

| Property     | Purpose                                                                  | Default              |
| ------------ | ------------------------------------------------------------------------ | -------------------- |
| `content`    | Required display text.                                                   | None.                |
| `size`       | Text size, greater than `0`.                                             | `10`.                |
| `font`       | Font name in `namespace:path` format.                                    | `minecraft:default`. |
| `opacity`    | Integer opacity from `0` to `255`.                                       | `255`.               |
| `line-width` | Automatic wrapping width in font pixels; a positive integer.             | `200`.               |
| `alignment`  | Alignment of lines in multiline text: `left`, `center` or `right`.       | `center`.            |
| `update`     | Periodic refresh interval in game ticks; `-1` disables periodic refresh. | `-1`.                |

```yaml
frontend:
  player-name:
    type: text
    content: '&f%player_name%'
    size: 5
    alignment: center
    offset: {y: 20, z: 1}
```

Text supports color codes and supported placeholders. `update` accepts only `-1` or a positive integer and is intended for periodically changing content, not animation speed. Spigot displays text when a menu opens, without periodic refresh, and supports only the default font and basic placeholders.

Custom fonts require players to load a pack containing the font. Specifying a name does not create one.

### Rectangle: `rectangle`

| Property          | Purpose                                | Default      |
| ----------------- | -------------------------------------- | ------------ |
| `width`, `height` | Required dimensions, greater than `0`. | None.        |
| `color`           | Quoted color in `'#RRGGBB'` format.    | `'#FFFFFF'`. |
| `opacity`         | Integer opacity from `0` to `255`.     | `255`.       |

```yaml
frontend:
  panel:
    type: rectangle
    width: 140
    height: 80
    color: '#182031'
    opacity: 235
```

Dimensions use canvas units. Set transparency with `opacity`, not within the color value: `0` is fully transparent and `255` fully opaque.

### Frame: `frame`

Supported fields are `width`, `height`, `thickness`, `color` and `opacity`.

`width`, `height` and `thickness` are required and must be greater than `0`. Border thickness must be less than half of both dimensions. Color and opacity follow the rectangle rules.

```yaml
frontend:
  panel-border:
    type: frame
    width: 140
    height: 80
    thickness: 1
    color: '#617DA0'
    offset: {z: 1}
```

A frame does not fill its interior. Configure a rectangle and frame separately for a background with a border.

### Line: `line`

Supported fields are `width`, `thickness`, `color` and `opacity`. `width` is length and `thickness` is line thickness; both are required and greater than `0`. Color and opacity follow the rectangle rules.

```yaml
frontend:
  divider:
    type: line
    width: 100
    thickness: 1
    color: '#617DA0'
    offset: {y: 10, z: 1}
```

Lines are horizontal by default. Use `rotation: {z: 90}` for a vertical line. Lines use `thickness`, not `height`.

### Image: `image`

Available only on Paper, Folia, Leaf and compatible servers.

| Property          | Purpose                                                                     | Default                                                                   |
| ----------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `source`          | Required PNG path.                                                          | None.                                                                     |
| `width`, `height` | Independently configured display dimensions.                                | Original pixel width and height, respectively, used as canvas dimensions. |
| `opacity`         | Integer opacity from `0` to `255`.                                          | `255`.                                                                    |
| `color`           | Optional image tint in `'#RRGGBB'` format.                                  | Original colors.                                                          |
| `update`          | Periodic refresh interval for image path content, following the text rules. | `-1`.                                                                     |

```yaml
frontend:
  logo:
    type: image
    source: /example.png
    width: 40
    height: 40
    offset: {z: 1}
```

`/example.png` refers to `plugins/ArcMenu/images/example.png`. Paths begin with `/`, use lowercase names and end in `.png`. A subdirectory example is `/ui/logo.png`.

Setting only width or height leaves the other dimension at its original value; it does not calculate the aspect ratio automatically. Set both dimensions proportionally to preserve the image's proportions.

Missing images are not displayed. `update` does not reload image files from disk. After changing files, rebuild resources and update the pack players receive; see [Images and resource packs](/arcmenu-wiki/feature-configuration/resource-packs.md).

### Item: `item`

| Property   | Purpose                                                | Default |
| ---------- | ------------------------------------------------------ | ------- |
| `material` | Required material or supported custom item identifier. | None.   |
| `context`  | Item display context.                                  | `GUI`.  |

```yaml
frontend:
  sword:
    type: item
    material: minecraft:diamond_sword
    context: GUI
    scale: {x: 24, y: 24, z: 24}
    offset: {z: 2}
```

Size items with `scale`, not `width` or `height`. `scale.z` is independent and defaults to `1`; it does not follow `x` or `y`.

Supported `context` values are `GUI`, `HEAD`, `FIXED`, `GROUND`, `NONE`, `FIRSTPERSON_LEFTHAND`, `FIRSTPERSON_RIGHTHAND`, `THIRDPERSON_LEFTHAND` and `THIRDPERSON_RIGHTHAND`. Use the uppercase values as written.

Paper-based servers also support CraftEngine item identifiers and these material forms:

| Form                                      | Purpose                                                     |
| ----------------------------------------- | ----------------------------------------------------------- |
| `'<head:%player_name%>'`                  | Player head using a player name or UUID.                    |
| `'<skull:TEXTURE_VALUE>'`                 | Head using a valid skin texture hash or Base64 value.       |
| `'coal<model-data:1>'`                    | Custom model data; requires a matching resource-pack model. |
| `'leather chestplate<dye:255,255,0>'`     | RGB color for leather equipment.                            |
| `'white banner<banner:RED MOJANG,WHITE>'` | Ordered banner patterns.                                    |

`head` and `skull` cannot be combined. Dye applies only to leather equipment and banner settings only to banners. Spigot supports vanilla material names without these tags or CraftEngine items.

### Block: `block`

`block-data` is required and must specify a valid vanilla block name, optionally with block states.

```yaml
frontend:
  grass:
    type: block
    block-data: 'minecraft:grass_block[snowy=false]'
    rotation: {x: -20, y: 35}
    scale: {x: 24, y: 24, z: 24}
    offset: {z: 2}
```

Like items, blocks use `scale.x`, `scale.y` and `scale.z` rather than `width` or `height`. The block and its states must exist in the server version in use.

### Group: `group`

Groups have no visible content of their own. Their `children` section contains elements. Common properties move, rotate, scale or hide those elements together.

Children follow the same element name → type and properties structure. Group configuration and template reuse are covered in [Groups and reusable templates](/arcmenu-wiki/menu-configuration/menus/groups-templates.md).

## Applying changes

After editing elements, run `/arcmenu validate` and `/arcmenu reload`, then reopen the menu to check the result. Image or template changes require `/arcmenu reload all` and resource-pack updates where applicable.

Visible elements do not provide click actions on their own. Configure backend regions for interaction; position and size relationships are explained in [Canvas, coordinates and screen placement](/arcmenu-wiki/menu-configuration/menus/canvas.md).
