Astral Realms Documentation Help

Dialog Inputs

Inputs are interactive widgets placed inside a dialog. Each input has an id (the map key in YAML), and its value is available as %input_<id>% inside button actions after the player submits.

text

A single-line or multi-line text field.

inputs: username: type: text label: "Username" width: 200 max-length: 16 initial: "Steve" label-visible: true multi-lines: max-lines: 3 height: 60

Field

Type

Default

Description

label

String (MiniMessage)

—

Label displayed above or beside the input.

width

int

API default

Width in pixels. 0 uses the default.

max-length

int

API default

Maximum character count. 0 means unlimited.

initial

String

""

Pre-filled placeholder text.

label-visible

boolean

true

Whether the label is shown.

multi-lines

Object

null

Enable multi-line mode.

multi-lines.max-lines

int

—

Maximum number of lines.

multi-lines.height

int

—

Total height of the multi-line area in pixels.

Button action placeholder: %input_<id>% → the string the player typed.

boolean

A toggle button (on/off switch).

inputs: agree: type: boolean label: "I accept the terms" initial: false true-text: "Enabled" false-text: "Disabled"

Field

Type

Default

Description

label

String (MiniMessage)

—

Label text.

initial

boolean

false

Initial toggle state.

true-text

String

"true"

Text shown when toggled on.

false-text

String

"false"

Text shown when toggled off.

Button action placeholder: %input_<id>% → "true" or "false".

slider

A numeric range slider.

inputs: quantity: type: slider label: "Quantity" width: 200 start: 1 end: 64 initial: 1 step: 1

Field

Type

Default

Description

label

String (MiniMessage)

—

Label text.

width

int

API default

Width in pixels.

start

float

—

Minimum value (inclusive).

end

float

—

Maximum value (inclusive).

initial

float

start

Starting position. Must be within [start, end].

step

float

1

Increment between steps. 0 uses the default.

Button action placeholder: %input_<id>% → the float value as a string (e.g. "5.0").

options

A dropdown (single-choice selector).

inputs: payment: type: options label: "Payment method" width: 200 label-visible: true options: coins: display: "Coins" initial: true gems: display: "Gems" initial: false

Field

Type

Default

Description

label

String (MiniMessage)

—

Label text.

width

int

API default

Width in pixels.

label-visible

boolean

true

Whether to show the label.

options

Map<String, Option>

—

Available choices. Key is the internal value, display is shown to the player.

options.<key>.display

Component

—

MiniMessage display name shown in the list.

options.<key>.initial

boolean

false

Whether this option is selected by default. Only the first entry (in declaration order) that resolves to true keeps the flag; any later initial: true is silently downgraded to false, so the client never rejects the dialog with Multiple initial values.

Button action placeholder: %input_<id>% → the key string of the selected option (e.g. "coins").

Last modified: 03 September 2026